build: fix installing GoogleTest

Add the `EXCLUDE_FROM_ALL` keyword to the `FetchContent_Declare` call
for GoogleTest, so that gtest/gmock are not installed with the project.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2024-09-09 14:43:34 +00:00
parent 7128e6dd08
commit d619ee2bb1
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 1 additions and 0 deletions

View File

@ -87,6 +87,7 @@ include(Dependencies)
if(BUILD_TESTING) if(BUILD_TESTING)
FetchContent_Declare(googletest FetchContent_Declare(googletest
URL https://github.com/google/googletest/archive/2d16ed055d09c3689d44b272adc097393de948a0.zip URL https://github.com/google/googletest/archive/2d16ed055d09c3689d44b272adc097393de948a0.zip
EXCLUDE_FROM_ALL
) )
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)