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
diff --git a/absl/CMakeLists.txt b/absl/CMakeLists.txt
index 3a7c12f..810d7f3 100644
--- a/absl/CMakeLists.txt
+++ b/absl/CMakeLists.txt
@@ -36,9 +36,9 @@
 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()
diff --git a/ci/windows_msvc_cmake.bat b/ci/windows_msvc_cmake.bat
index c0f1ac9..8b431d7 100755
--- a/ci/windows_msvc_cmake.bat
+++ b/ci/windows_msvc_cmake.bat
@@ -56,7 +56,6 @@
 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% ^