diff --git a/test/gtest/CMakeLists.txt b/test/gtest/CMakeLists.txt index 8349cbda987c121740fb74fbaa615f43ce9fc3e8..2294c819aec95c1f2c6bed5c0e7b1d6cc857c614 100644 --- a/test/gtest/CMakeLists.txt +++ b/test/gtest/CMakeLists.txt @@ -55,13 +55,8 @@ else() GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG main) - #FetchContent_MakeAvailable(googletest) - # Disable installation of googletest: https://stackoverflow.com/questions/65527126/disable-install-for-fetchcontent - FetchContent_GetProperties(googletest) - if(NOT googletest_POPULATED) - FetchContent_Populate(googletest) - add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL) - endif() + SET(INSTALL_GTEST OFF) # Disable installation of googletest + FetchContent_MakeAvailable(googletest) endif()