summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-08-01 14:02:07 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-08-01 14:02:25 (GMT)
commit26431c187763660be6a417189a12b9728b8c64b9 (patch)
tree408171d70205dbfdadd5e580f97a82459859ef83
parent11a4c8667a5a13c112da78018868afb21d89f417 (diff)
parent1aa95e1a3b0f29ca35554b1bb003f714c315e047 (diff)
downloadCMake-26431c187763660be6a417189a12b9728b8c64b9.zip
CMake-26431c187763660be6a417189a12b9728b8c64b9.tar.gz
CMake-26431c187763660be6a417189a12b9728b8c64b9.tar.bz2
Merge topic 'FindGTest-gmock-needs-gtest'
1aa95e1a3b FindGTest: Create the gmock targets only when GTest has been found Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7523
-rw-r--r--Modules/FindGTest.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index 60bb401..92334e4 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -314,7 +314,7 @@ if(GTest_FOUND)
__gtest_define_backwards_compatible_library_targets()
endif()
-if(GMock_FOUND)
+if(GMock_FOUND AND GTest_FOUND)
if(NOT TARGET GTest::gmock)
__gtest_determine_library_type(GMOCK_LIBRARY)
add_library(GTest::gmock ${GMOCK_LIBRARY_TYPE} IMPORTED)