Skip to content

Commit 3871ff0

Browse files
committed
Don't build the googlemock subproject, only the main googletest library
1 parent dfa4dd8 commit 3871ff0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,8 @@ if (SQLITECPP_BUILD_TESTS)
459459
if (NOT EXISTS "${PROJECT_SOURCE_DIR}/googletest/CMakeLists.txt")
460460
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")
461461
endif ()
462+
# don't build the googlemock subproject, only the main googletest library
463+
set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject")
462464
add_subdirectory(googletest)
463465
include_directories("${PROJECT_SOURCE_DIR}/googletest/googletest/include")
464466

0 commit comments

Comments
 (0)