ac534fb651
Enable and run test suite
27 lines
1.2 KiB
Diff
27 lines
1.2 KiB
Diff
diff -up ./CMakeLists.txt.2 ./CMakeLists.txt
|
|
--- ./CMakeLists.txt.2 2021-04-20 12:55:14.000000000 -0400
|
|
+++ ./CMakeLists.txt 2021-05-21 22:26:12.910191071 -0400
|
|
@@ -127,6 +127,22 @@ if(BUILD_TESTING)
|
|
set(absl_gtest_src_dir ${ABSL_LOCAL_GOOGLETEST_DIR})
|
|
endif()
|
|
include(CMake/Googletest/DownloadGTest.cmake)
|
|
+ else()
|
|
+ # Set up gtest targets
|
|
+ find_library(GTEST_LIB gtest)
|
|
+ add_library(gtest UNKNOWN IMPORTED)
|
|
+ set_target_properties(gtest PROPERTIES IMPORTED_LOCATION ${GTEST_LIB})
|
|
+ find_library(GTEST_MAIN_LIB gtest_main)
|
|
+ add_library(gtest_main UNKNOWN IMPORTED)
|
|
+ set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION ${GTEST_MAIN_LIB} INTERFACE_LINK_LIBRARIES gtest)
|
|
+
|
|
+ # Set up gmock targets
|
|
+ find_library(GMOCK_LIB gmock)
|
|
+ add_library(gmock UNKNOWN IMPORTED)
|
|
+ set_target_properties(gmock PROPERTIES IMPORTED_LOCATION ${GMOCK_LIB} INTERFACE_LINK_LIBRARIES gtest)
|
|
+ find_library(GMOCK_MAIN_LIB gmock_main)
|
|
+ add_library(gmock_main UNKNOWN IMPORTED)
|
|
+ set_target_properties(gmock_main PROPERTIES IMPORTED_LOCATION ${GMOCK_MAIN_LIB} INTERFACE_LINK_LIBRARIES "gmock;Threads::Threads")
|
|
endif()
|
|
|
|
check_target(gtest)
|