build: move googletest to FetchContent_MakeAvailable

This commit is contained in:
Michele Caini
2024-08-23 16:21:05 +02:00
parent 818e8755c2
commit 07a372e994
2 changed files with 3 additions and 8 deletions

2
TODO
View File

@@ -38,7 +38,7 @@ TODO:
* exploit ref/cref in any to avoid invoking the vtable if possible
* entity based component_traits
* copy-and-swap for any and meta_any
* fix cmake warning about FetchContent_Populate
* review cmake warning about FetchContent_Populate (need .28 and EXCLUDE_FROM_ALL for FetchContent)
* deprecate meta properties in favor of custom data
* make meta objects safe to use with null nodes
* meta: vectors for details and props

View File

@@ -16,13 +16,8 @@ else()
GIT_SHALLOW 1
)
FetchContent_GetProperties(googletest)
if(NOT googletest_POPULATED)
FetchContent_Populate(googletest)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
endif()
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
add_library(GTest::Main ALIAS gtest_main)