Skip to content

Commit 04d0fa4

Browse files
authored
Disable -Wnullability-completeness on iOS and macOS. (#782)
* Disable -Wnullability-completeness on iOS and macOS. * Remove NDK if the cache hit failed.
1 parent 959ac24 commit 04d0fa4

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/android.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,17 @@ jobs:
9191
path: /tmp/android-ndk-r16b
9292
key: android-ndk-${{ matrix.os }}-r16b
9393

94+
- name: Check cached NDK
95+
shell: bash
96+
if: steps.cache_ndk.outputs.cache-hit != 'true'
97+
run: |
98+
# If the NDK failed to download from the cache, but there is a
99+
# /tmp/android-ndk-r16b directory, it's incomplete, so remove it.
100+
if [[ -d "/tmp/android-ndk-r16b" ]]; then
101+
echo "Removing incomplete download of NDK"
102+
rm -rf /tmp/android-ndk-r16b
103+
fi
104+
94105
- name: Update homebrew (avoid bintray errors)
95106
uses: nick-invision/retry@v2
96107
if: startsWith(matrix.os, 'macos')

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ if(DESKTOP AND APPLE)
147147
endif()
148148
endif()
149149

150+
if(APPLE)
151+
# For iOS and macOS, disable nullability completeness warning, as it makes the
152+
# build output for our Objective-C++ files much too verbose.
153+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-nullability-completeness")
154+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-completeness")
155+
endif()
156+
150157
if(DESKTOP AND NOT MSVC AND NOT APPLE)
151158
# Linux-specific option.
152159
if (FIREBASE_LINUX_USE_CXX11_ABI)

0 commit comments

Comments
 (0)