cmake: do not install googletest
authorKefu Chai <kchai@redhat.com>
Thu, 2 May 2019 15:35:23 +0000 (23:35 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 2 May 2019 15:52:45 +0000 (23:52 +0800)
the new googletest added an option to allow its consumer to skip this,
so instead of patching googletest, let's use this option.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/CMakeLists.txt

index 0c5d02377bfe91185660212b50126b0f3c0e4bf4..73ed94ab9aec5b23628793e4f542afe7ca8b4cec 100644 (file)
@@ -529,6 +529,7 @@ if(WITH_TESTS)
     find_package(GTest REQUIRED)
     find_package(GMock REQUIRED)
   else()
+    set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
     add_subdirectory(googletest/googlemock)
     add_library(GMock::GMock ALIAS gmock)
     add_library(GMock::Main ALIAS gmock_main)