Skip to content

Commit b875e3b

Browse files
committed
tests: Update fetchcontent usage
1 parent c061afd commit b875e3b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tests/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@ FetchContent_Declare(
33
googletest
44
GIT_REPOSITORY https://github.com/google/googletest.git
55
GIT_TAG v1.14.0
6+
EXCLUDE_FROM_ALL
67
)
7-
8-
FetchContent_GetProperties(googletest)
9-
if(NOT googletest_POPULATED)
10-
set(INSTALL_GTEST OFF CACHE BOOL OFF FORCE)
11-
FetchContent_Populate(googletest)
12-
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
13-
endif()
14-
8+
set(INSTALL_GTEST OFF CACHE BOOL OFF FORCE)
9+
FetchContent_MakeAvailable(googletest)
1510

1611
## Build the tests ##
1712
set(tests

0 commit comments

Comments
 (0)