|
| 1 | +diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake |
| 2 | +index 61e1ae4..3e6ec94 100644 |
| 3 | +--- a/CMake/AbseilHelpers.cmake |
| 4 | ++++ b/CMake/AbseilHelpers.cmake |
| 5 | +@@ -350,7 +350,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n") |
| 6 | + endif() |
| 7 | + endif() |
| 8 | + |
| 9 | +- if(ABSL_ENABLE_INSTALL) |
| 10 | ++ if(ABSL_ENABLE_INSTALL AND NOT ABSL_CC_LIB_TESTONLY) |
| 11 | + install(TARGETS ${_NAME} EXPORT ${PROJECT_NAME}Targets |
| 12 | + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
| 13 | + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
| 14 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 15 | +index 26dc8e7..cd4fef1 100644 |
| 16 | +--- a/CMakeLists.txt |
| 17 | ++++ b/CMakeLists.txt |
| 18 | +@@ -145,7 +145,7 @@ if((BUILD_TESTING AND ABSL_BUILD_TESTING) OR ABSL_BUILD_TEST_HELPERS) |
| 19 | + add_library(GTest::gmock ALIAS gmock) |
| 20 | + add_library(GTest::gmock_main ALIAS gmock_main) |
| 21 | + else() |
| 22 | +- message(FATAL_ERROR "ABSL_USE_EXTERNAL_GOOGLETEST is ON and ABSL_FIND_GOOGLETEST is OFF, which means that the top-level project must build the Google Test project. However, the target gtest was not found.") |
| 23 | ++ message(WARNING "ABSL_USE_EXTERNAL_GOOGLETEST is ON and ABSL_FIND_GOOGLETEST is OFF, which means that the top-level project must build the Google Test project. However, the target gtest was not found.") |
| 24 | + endif() |
| 25 | + endif() |
| 26 | + else() |
| 27 | +diff --git a/absl/container/CMakeLists.txt b/absl/container/CMakeLists.txt |
| 28 | +index 365c6ea..d12e585 100644 |
| 29 | +--- a/absl/container/CMakeLists.txt |
| 30 | ++++ b/absl/container/CMakeLists.txt |
| 31 | +@@ -1119,6 +1119,7 @@ absl_cc_library( |
| 32 | + absl::config |
| 33 | + absl::test_instance_tracker |
| 34 | + GTest::gmock |
| 35 | ++ TESTONLY |
| 36 | + ) |
| 37 | + |
| 38 | + absl_cc_library( |
0 commit comments