Merge pull request #58 from scharlton2/54-fetchcontent_populate-is-deprecated-in-cmake-build

Closes #54
This commit is contained in:
Charlton, Scott R. 2024-08-16 18:08:24 -06:00 committed by GitHub
commit 79cc7201cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -461,8 +461,7 @@ if (STANDALONE_BUILD)
# Always build googletest static
set(SAVE_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF)
FetchContent_Populate(googletest)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
FetchContent_MakeAvailable(googletest)
set(BUILD_SHARED_LIBS ${SAVE_BUILD_SHARED_LIBS})
endif()