Merge pull request #509 from efcs/fix-gtest-install

Prevent GTest and GMock from being installed with Google Benchmark.
This commit is contained in:
Eric 2018-01-05 12:51:03 -07:00 committed by GitHub
commit e1c3a83b81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,6 +67,8 @@ endmacro(build_external_gtest)
if (BENCHMARK_ENABLE_GTEST_TESTS)
if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/googletest)
set(INSTALL_GTEST OFF CACHE INTERNAL "")
set(INSTALL_GMOCK OFF CACHE INTERNAL "")
add_subdirectory(${CMAKE_SOURCE_DIR}/googletest)
set(GTEST_BOTH_LIBRARIES gtest gtest_main)
elseif(BENCHMARK_DOWNLOAD_DEPENDENCIES)