diff options
author | Brad King <brad.king@kitware.com> | 2022-08-01 14:02:07 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-08-01 14:02:24 (GMT) |
commit | e0a39aeadee2675d050293ada5025f60f3fc0d2f (patch) | |
tree | c2e53550cf91bf436700fcf10ac3c472f4a97bca /Modules | |
parent | 6c3ea973815ef96e001df8a3a3a8bea5f21931e9 (diff) | |
parent | 1aa95e1a3b0f29ca35554b1bb003f714c315e047 (diff) | |
download | CMake-e0a39aeadee2675d050293ada5025f60f3fc0d2f.zip CMake-e0a39aeadee2675d050293ada5025f60f3fc0d2f.tar.gz CMake-e0a39aeadee2675d050293ada5025f60f3fc0d2f.tar.bz2 |
Merge topic 'FindGTest-gmock-needs-gtest' into release-3.24
1aa95e1a3b FindGTest: Create the gmock targets only when GTest has been found
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7523
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindGTest.cmake | 2 |
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) |