Skip to content

Commit 098ece1

Browse files
Fix GTest installation during test builds
Force INSTALL_GTEST off before fetching googletest so enabling CDDP_CPP_BUILD_TESTS does not install the bundled dependency alongside cddp.
1 parent a941218 commit 098ece1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ FetchContent_MakeAvailable(autodiff)
109109
# Googletest
110110
if (CDDP_CPP_BUILD_TESTS)
111111
enable_testing()
112+
set(INSTALL_GTEST OFF CACHE BOOL "Don't install GTest alongside cddp" FORCE)
112113
FetchContent_Declare(
113114
googletest
114115
GIT_REPOSITORY https://github.com/google/googletest.git

0 commit comments

Comments
 (0)