summaryrefslogtreecommitdiff
path: root/CMake/install_test_project/test.sh
diff options
context:
space:
mode:
authorGravatar Matt Armstrong <matta@users.noreply.github.com>2021-12-10 10:50:53 -0800
committerGravatar GitHub <noreply@github.com>2021-12-10 13:50:53 -0500
commitfb7dd24b18e82893e5922be5d1c8ae0f3fe3c9fa (patch)
treead6c07b31a997c8723fe7e413aa1e882cfa1f9e5 /CMake/install_test_project/test.sh
parent9336be04a242237cd41a525bedfcf3be1bb55377 (diff)
cmake: add ABSL_BUILD_TESTING option (#1057)
Abseil's own tests now are disabled if either BUILD_TESTING or a new option called ABSL_BUILD_TESTING is false. Additionally, Abseil's CMakeLists.txt no longer re-declares the BUILD_TESTING option with a value of false. Abseil had been using just the BUILD_TESTING option, since the fix for #901. Because setting BUILD_TESTING false still works to disable Abseil's tests, this change preserves the behavior asked for in that issue. Previous to that, Abseil had a project specific flag for this, as is the typical idiom used in other projects. The issue with BUILD_TESTING is that it is an all-or-nothing policy. When Abseil is incorporated as a subproject, the encompasing project has no convenient way to enable its own tests while disabling Abseil's. Fixes #1056
Diffstat (limited to 'CMake/install_test_project/test.sh')
-rwxr-xr-xCMake/install_test_project/test.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMake/install_test_project/test.sh b/CMake/install_test_project/test.sh
index aecbb8fe..cc028bac 100755
--- a/CMake/install_test_project/test.sh
+++ b/CMake/install_test_project/test.sh
@@ -55,7 +55,7 @@ cmake "${absl_dir}" \
-DABSL_USE_EXTERNAL_GOOGLETEST=ON \
-DABSL_FIND_GOOGLETEST=ON \
-DCMAKE_BUILD_TYPE=Release \
- -DBUILD_TESTING=ON \
+ -DABSL_BUILD_TESTING=ON \
-DBUILD_SHARED_LIBS="${build_shared_libs}"
make -j $(nproc)
ctest -j $(nproc) --output-on-failure