Build abseil_test_dll with ABSL_BUILD_TESTING

... even if ABSL_BUILD_TEST_HELPERS is not specified.

When not using ABSL_BUILD_DLL, tests builds even if ABSL_BUILD_TEST_HELPERS is not specified. Make this work for ABSL_BUILD_DLL, by ensuring that (BUILD_TESTING AND ABSL_BUILD_TESTING) triggers abseil_test_dll build.

PiperOrigin-RevId: 637493023
Change-Id: Icd5868c547365f4788caac47e002fbfc32a03e94
This commit is contained in:
Abseil Team
2024-05-26 18:13:50 -07:00
committed by Copybara-Service
parent baf07b1f62
commit 1c177722b9
2 changed files with 2 additions and 3 deletions

View File

@@ -36,9 +36,9 @@ add_subdirectory(time)
add_subdirectory(types)
add_subdirectory(utility)
if (${ABSL_BUILD_DLL})
if (ABSL_BUILD_DLL)
absl_make_dll()
if (${ABSL_BUILD_TEST_HELPERS})
if ((BUILD_TESTING AND ABSL_BUILD_TESTING) OR ABSL_BUILD_TEST_HELPERS)
absl_make_dll(TEST ON)
endif()
endif()

View File

@@ -56,7 +56,6 @@ CD "build"
SET CXXFLAGS="/WX"
%CMAKE_BIN% ^
-DABSL_BUILD_TEST_HELPERS=ON ^
-DABSL_BUILD_TESTING=ON ^
-DABSL_GOOGLETEST_DOWNLOAD_URL=%ABSL_GOOGLETEST_DOWNLOAD_URL% ^
-DBUILD_SHARED_LIBS=%ABSL_CMAKE_BUILD_SHARED% ^