diff options
author | Benjamin Barenblat <bbaren@google.com> | 2020-11-06 16:44:14 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@google.com> | 2020-11-06 16:44:14 -0500 |
commit | f64a528d49d800f3ed838d760f463d5b8a90834f (patch) | |
tree | 24cce6d3dbf35d4861241406e631273384716724 /ci/macos_xcode_cmake.sh | |
parent | 2a70faa9c412d8888753ffcdcf8778e6c01ac175 (diff) | |
parent | 0f3bb466b868b523cf1dc9b2aaaed65c77b28862 (diff) |
Merge upstream LTS update 20200923.2
This update preserves both API and ABI compatibility.
Diffstat (limited to 'ci/macos_xcode_cmake.sh')
-rwxr-xr-x | ci/macos_xcode_cmake.sh | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/ci/macos_xcode_cmake.sh b/ci/macos_xcode_cmake.sh index cf78e207..d90e273a 100755 --- a/ci/macos_xcode_cmake.sh +++ b/ci/macos_xcode_cmake.sh @@ -28,17 +28,25 @@ if [[ -z ${ABSL_CMAKE_BUILD_TYPES:-} ]]; then ABSL_CMAKE_BUILD_TYPES="Debug" fi +if [[ -z ${ABSL_CMAKE_BUILD_SHARED:-} ]]; then + ABSL_CMAKE_BUILD_SHARED="OFF ON" +fi + for compilation_mode in ${ABSL_CMAKE_BUILD_TYPES}; do - BUILD_DIR=$(mktemp -d ${compilation_mode}.XXXXXXXX) - cd ${BUILD_DIR} + for build_shared in ${ABSL_CMAKE_BUILD_SHARED}; do + BUILD_DIR=$(mktemp -d ${compilation_mode}.XXXXXXXX) + cd ${BUILD_DIR} - # TODO(absl-team): Enable -Werror once all warnings are fixed. - time cmake ${ABSEIL_ROOT} \ - -GXcode \ - -DCMAKE_BUILD_TYPE=${compilation_mode} \ - -DCMAKE_CXX_STANDARD=11 \ - -DABSL_USE_GOOGLETEST_HEAD=ON \ - -DABSL_RUN_TESTS=ON - time cmake --build . - time ctest -C ${compilation_mode} --output-on-failure + # TODO(absl-team): Enable -Werror once all warnings are fixed. + time cmake ${ABSEIL_ROOT} \ + -GXcode \ + -DBUILD_SHARED_LIBS=${build_shared} \ + -DCMAKE_BUILD_TYPE=${compilation_mode} \ + -DCMAKE_CXX_STANDARD=11 \ + -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--no-undefined" \ + -DABSL_USE_GOOGLETEST_HEAD=ON \ + -DABSL_RUN_TESTS=ON + time cmake --build . + time ctest -C ${compilation_mode} --output-on-failure + done done |