summaryrefslogtreecommitdiff
path: root/ci/linux_gcc-latest_libstdcxx_cmake.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/linux_gcc-latest_libstdcxx_cmake.sh')
-rwxr-xr-xci/linux_gcc-latest_libstdcxx_cmake.sh55
1 files changed, 34 insertions, 21 deletions
diff --git a/ci/linux_gcc-latest_libstdcxx_cmake.sh b/ci/linux_gcc-latest_libstdcxx_cmake.sh
index 1f721236..243901c2 100755
--- a/ci/linux_gcc-latest_libstdcxx_cmake.sh
+++ b/ci/linux_gcc-latest_libstdcxx_cmake.sh
@@ -34,33 +34,46 @@ if [[ -z ${ABSL_CMAKE_BUILD_SHARED:-} ]]; then
ABSL_CMAKE_BUILD_SHARED="OFF ON"
fi
+if [[ -z ${ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS:-} ]]; then
+ ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS="OFF ON"
+fi
+
source "${ABSEIL_ROOT}/ci/linux_docker_containers.sh"
readonly DOCKER_CONTAINER=${LINUX_GCC_LATEST_CONTAINER}
for std in ${ABSL_CMAKE_CXX_STANDARDS}; do
for compilation_mode in ${ABSL_CMAKE_BUILD_TYPES}; do
for build_shared in ${ABSL_CMAKE_BUILD_SHARED}; do
- time docker run \
- --mount type=bind,source="${ABSEIL_ROOT}",target=/abseil-cpp,readonly \
- --tmpfs=/buildfs:exec \
- --workdir=/buildfs \
- --cap-add=SYS_PTRACE \
- --rm \
- -e CFLAGS="-Werror" \
- -e CXXFLAGS="-Werror" \
- ${DOCKER_EXTRA_ARGS:-} \
- "${DOCKER_CONTAINER}" \
- /bin/bash -c "
- cmake /abseil-cpp \
- -DABSL_GOOGLETEST_DOWNLOAD_URL=${ABSL_GOOGLETEST_DOWNLOAD_URL} \
- -DBUILD_SHARED_LIBS=${build_shared} \
- -DABSL_BUILD_TESTING=ON \
- -DCMAKE_BUILD_TYPE=${compilation_mode} \
- -DCMAKE_CXX_STANDARD=${std} \
- -DCMAKE_MODULE_LINKER_FLAGS=\"-Wl,--no-undefined\" && \
- make -j$(nproc) && \
- TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo \
- ctest -j$(nproc) --output-on-failure"
+ if [[ $build_shared == "OFF" ]]; then
+ monolithic_shared_options="OFF"
+ else
+ monolithic_shared_options="$ABSL_CMAKE_BUILD_MONOLITHIC_SHARED_LIBS"
+ fi
+
+ for monolithic_shared in $monolithic_shared_options; do
+ time docker run \
+ --mount type=bind,source="${ABSEIL_ROOT}",target=/abseil-cpp,readonly \
+ --tmpfs=/buildfs:exec \
+ --workdir=/buildfs \
+ --cap-add=SYS_PTRACE \
+ --rm \
+ -e CFLAGS="-Werror" \
+ -e CXXFLAGS="-Werror" \
+ ${DOCKER_EXTRA_ARGS:-} \
+ "${DOCKER_CONTAINER}" \
+ /bin/bash -c "
+ cmake /abseil-cpp \
+ -DABSL_GOOGLETEST_DOWNLOAD_URL=${ABSL_GOOGLETEST_DOWNLOAD_URL} \
+ -DBUILD_SHARED_LIBS=${build_shared} \
+ -DABSL_BUILD_TESTING=ON \
+ -DCMAKE_BUILD_TYPE=${compilation_mode} \
+ -DCMAKE_CXX_STANDARD=${std} \
+ -DABSL_BUILD_MONOLITHIC_SHARED_LIBS=${monolithic_shared} \
+ -DCMAKE_MODULE_LINKER_FLAGS=\"-Wl,--no-undefined\" && \
+ make -j$(nproc) && \
+ TZDIR=/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo \
+ ctest -j$(nproc) --output-on-failure"
+ done
done
done
done