build: move googletest to FetchContent_MakeAvailable
This commit is contained in:
2
TODO
2
TODO
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user