cmake: fix configure when using -DBUILD_TESTING=OFF

This commit is contained in:
Corentin Le Molgat
2025-11-21 10:06:27 +01:00
parent bb8da74956
commit ebe81847a8
3 changed files with 19 additions and 7 deletions

View File

@@ -120,7 +120,11 @@ if(BUILD_absl)
set(ABSL_USE_SYSTEM_INCLUDES ON)
# We want Abseil to declare what C++ standard it was compiled with.
set(ABSL_PROPAGATE_CXX_STD ON)
set(ABSL_BUILD_TEST_HELPERS ON)
if(OR_TOOLS_BUILD_TESTING)
set(ABSL_BUILD_TEST_HELPERS ON)
else()
set(ABSL_BUILD_TEST_HELPERS OFF)
endif()
set(ABSL_USE_EXTERNAL_GOOGLETEST ON)
set(ABSL_FIND_GOOGLETEST OFF)
# We want Abseil to keep the INSTALL rules enabled, even though it is a