Skip to content

Commit 4e823e1

Browse files
committed
Set the FIRESTORE_INCLUDE_OBJC cmake cache var to NO to avoid building Objective-C parts of the iOS SDK
This fixes the following build error: ``` FIRFirestore.h:147:20: error: unknown attribute 'swift_async' ignored [-Werror,-Wunknown-attributes] __attribute__((swift_async(none))); // Disable async import due to #9426. ^ 1 error generated. ``` which was introduced by firebase/firebase-ios-sdk#9502
1 parent 16605a9 commit 4e823e1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ if(FIREBASE_INCLUDE_FIRESTORE AND DESKTOP)
215215
set(FIRESTORE_USE_EXTERNAL_CMAKE_BUILD ON)
216216
endif()
217217

218+
# Disable compiling the Objective-C (and Swift) stuff from the
219+
# firebase-ios-sdk since it's not needed and can sometimes fail to build.
220+
set(FIRESTORE_INCLUDE_OBJC NO)
221+
218222
if(FIREBASE_CPP_USE_PRIOR_GRADLE_BUILD)
219223
# Quote meta characters in ${CMAKE_CURRENT_LIST_DIR} so we can
220224
# match it in a regex.

cmake/external/firestore.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ExternalProject_Add(
2424

2525
DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
2626
GIT_REPOSITORY https://github.com/firebase/firebase-ios-sdk
27-
GIT_TAG 582b384c99a5dd24331161d436fdb6fd088fa833
27+
GIT_TAG d57360f1bf2dd7ecb85a768e8912d0045b00b88d
2828
GIT_SHALLOW ON
2929

3030
PREFIX ${PROJECT_BINARY_DIR}

0 commit comments

Comments
 (0)