cmake: do not install googletest

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>
This commit is contained in:
Kefu Chai 2019-05-02 23:35:23 +08:00
parent 9acf335464
commit d4387d33ef

View 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)