Skip to content

Commit db59d10

Browse files
cynthiajoanCynthia Jiang
andauthored
Fix ios build issue after fat lib change (#193)
modify the cmake command to make sure gha builds Co-authored-by: Cynthia Jiang <[email protected]>
1 parent 102121c commit db59d10

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

build_ios.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,14 @@ function check_exit_code {
112112
fi
113113
}
114114

115-
CMAKE_OPTIONS=
115+
CMAKE_OPTIONS="-DFIREBASE_UNITY_BUILD_TESTS=ON"
116+
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DFIREBASE_CPP_BUILD_STUB_TESTS=ON" # enable a stub gtest target to get abseil-cpp working.
116117

117118
if [ -d "../firebase-cpp-sdk" ]; then
118119
REAL_PATH=`python -c "import os; print(os.path.realpath('../firebase-cpp-sdk'))"`
119-
CMAKE_OPTIONS="-DFIREBASE_CPP_SDK_DIR=$REAL_PATH "
120+
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DFIREBASE_CPP_SDK_DIR=$REAL_PATH"
120121
fi
121122

122-
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DUNITY_ROOT_DIR=${UNITY_ROOT_DIR}"
123-
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DFIREBASE_UNITY_BUILD_TESTS=ON"
124-
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DFIREBASE_CPP_BUILD_STUB_TESTS=ON" # enable a stub gtest target to get abseil-cpp working.
125-
126123
# Display commands being run.
127124
set -x
128125

@@ -132,14 +129,15 @@ mkdir -p "$buildpath"
132129
pushd "$buildpath"
133130

134131
# Configure cmake with option value
135-
cmake ${sourcepath} -DCMAKE_TOOLCHAIN_FILE=${sourcepath}/cmake/unity_ios.cmake -DCMAKE_OSX_ARCHITECTURES=$SUPPORTED_ARCHITECTURES ${CMAKE_OPTIONS} ${cmake_extra}
132+
cmake $sourcepath \
133+
-DCMAKE_TOOLCHAIN_FILE=$sourcepath/cmake/unity_ios.cmake \
134+
-DCMAKE_OSX_ARCHITECTURES=$SUPPORTED_ARCHITECTURES \
135+
-DUNITY_ROOT_DIR=${UNITY_ROOT_DIR} \
136+
$CMAKE_OPTIONS \
137+
$cmake_extra
136138
check_exit_code $?
137139

138140
# Build the SDK
139-
# using make -j <nprocs> is having some issues where the build hangs
140-
# and continues on pressing return only to stop sometime later.
141-
# Disabling parallel builds for now.
142-
# TODO: Enable parallel builds after finding the reason
143141
make
144142
check_exit_code $?
145143

0 commit comments

Comments
 (0)