Don't build the googlemock subproject, only the main googletest library

This commit is contained in:
Sébastien Rombauts 2023-08-18 22:33:18 +02:00
parent dfa4dd8005
commit 3871ff0962

View File

@ -459,6 +459,8 @@ if (SQLITECPP_BUILD_TESTS)
if (NOT EXISTS "${PROJECT_SOURCE_DIR}/googletest/CMakeLists.txt")
message(FATAL_ERROR "Missing 'googletest' submodule! Either use 'git submodule init' and 'git submodule update' to get googletest according to the README, or deactivate unit tests with -DSQLITECPP_BUILD_TESTS=OFF")
endif ()
# don't build the googlemock subproject, only the main googletest library
set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject")
add_subdirectory(googletest)
include_directories("${PROJECT_SOURCE_DIR}/googletest/googletest/include")