Skip to content

Commit 157a6cc

Browse files
committed
More clean up
1 parent 6e1bfaa commit 157a6cc

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

app/CMakeLists.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -367,25 +367,29 @@ target_link_libraries(firebase_app
367367
${app_flatbuffers_lib}
368368
${LIBSECRET_LIBRARIES}
369369
)
370+
# Automatically include headers that might not be declared.
371+
# We use add_compile_options (instead of target_compile_options) so these
372+
# implicit includes apply globally to all targets in this directory,
373+
# including tests. Generator expressions ($<$<COMPILE_LANGUAGE:...>) are
374+
# used to ensure these C/C++ headers are not passed to the Swift compiler.
370375
if(MSVC)
371-
target_compile_options(firebase_app PRIVATE
376+
add_compile_options(
372377
$<$<COMPILE_LANGUAGE:CXX>:/FI"assert.h" /FI"string.h" /FI"stdint.h">)
373378
elseif(APPLE)
374-
target_compile_options(firebase_app PRIVATE
379+
add_compile_options(
375380
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include assert.h>"
376381
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include string.h>"
377382
"$<$<COMPILE_LANGUAGE:OBJCXX>:SHELL:-include assert.h>"
378383
"$<$<COMPILE_LANGUAGE:OBJCXX>:SHELL:-include string.h>")
379384
else()
380-
target_compile_options(firebase_app PRIVATE
385+
add_compile_options(
381386
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include assert.h>"
382387
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include string.h>")
383388
endif()
384389

385390
if(ANDROID)
386391
firebase_cpp_proguard_file(app)
387392
elseif(IOS)
388-
# Enable Automatic Reference Counting (ARC) and Bitcode.
389393
# Enable Automatic Reference Counting (ARC) for Objective-C/Swift interop
390394
target_compile_options(firebase_app
391395
PUBLIC $<$<NOT:$<COMPILE_LANGUAGE:Swift>>:-fobjc-arc>)
@@ -429,13 +433,14 @@ if (IOS)
429433
if (FIREBASE_XCODE_TARGET_FORMAT STREQUAL "frameworks")
430434
if (FIREBASE_INCLUDE_ANALYTICS)
431435
set(analytics_HDRS
432-
${FIREBASE_SOURCE_DIR}/analytics/src/include/firebase/analytics.h
433-
${FIREBASE_GEN_FILE_DIR}/analytics/src/include/firebase/analytics/event_names.h
434-
${FIREBASE_GEN_FILE_DIR}/analytics/src/include/firebase/analytics/parameter_names.h
435-
${FIREBASE_GEN_FILE_DIR}/analytics/src/include/firebase/analytics/user_property_names.h)
436+
${FIREBASE_SOURCE_DIR}/analytics/src/include/firebase/analytics.h
437+
${FIREBASE_GEN_FILE_DIR}/analytics/src/include/firebase/analytics/event_names.h
438+
${FIREBASE_GEN_FILE_DIR}/analytics/src/include/firebase/analytics/parameter_names.h
439+
${FIREBASE_GEN_FILE_DIR}/analytics/src/include/firebase/analytics/user_property_names.h)
436440
else()
437441
set(analytics_HDRS "")
438442
endif()
443+
endif()
439444
set(app_check_HDRS
440445
${FIREBASE_SOURCE_DIR}/app_check/src/include/firebase/app_check.h
441446
${FIREBASE_SOURCE_DIR}/app_check/src/include/firebase/app_check/app_attest_provider.h
@@ -550,5 +555,4 @@ if (IOS)
550555
# to destination dir "Headers/google_play_services/*"
551556
set_property(SOURCE "src/include/google_play_services/availability.h" PROPERTY
552557
MACOSX_PACKAGE_LOCATION Headers/google_play_services)
553-
endif() # framework_HDRS
554558
endif()

scripts/gha/build_ios_tvos.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def build_universal_framework(frameworks_path, targets):
253253
universal_target_path = os.path.join(framework_os_path, 'universal',
254254
target_framework)
255255
logging.debug('Ensuring all directories exist: ' + universal_target_path)
256-
os.makedirs(universal_target_path, exist_ok=True)
256+
os.makedirs(universal_target_path)
257257
# <build_dir>/<apple_os>/frameworks/universal/<target>.framework/<target>
258258
universal_target_library_path = os.path.join(universal_target_path,
259259
target)
@@ -279,8 +279,7 @@ def build_universal_framework(frameworks_path, targets):
279279
'Headers')
280280

281281
shutil.copytree(firebase_framework_headers_path,
282-
universal_firebase_framework_headers_path,
283-
dirs_exist_ok=True)
282+
universal_firebase_framework_headers_path)
284283

285284

286285
def build_xcframeworks(frameworks_path, xcframeworks_path, template_info_plist,
@@ -410,7 +409,7 @@ def build_xcframeworks(frameworks_path, xcframeworks_path, template_info_plist,
410409
xcframework_key,
411410
'{0}.framework'.format(target))
412411
logging.debug('Ensuring all directories exist: ' + library_output_dir)
413-
os.makedirs(library_output_dir, exist_ok=True)
412+
os.makedirs(library_output_dir)
414413
cmd = ['lipo', '-create']
415414
cmd.extend(xcframework_libraries)
416415
cmd.append('-output')

0 commit comments

Comments
 (0)