Skip to content

Commit 179cc9f

Browse files
committed
Set the FIRESTORE_INCLUDE_OBJC cmake cache var to NO to avoid building Objective-C parts of the iOS SDK.
This won't have any effects until the iOS dependencies are updated to a version that includes firebase/firebase-ios-sdk#9658. This will fix 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. It avoids it by simply not building the file at all :)
1 parent fd054fa commit 179cc9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
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.

0 commit comments

Comments
 (0)