diff --git a/test/gtest/CMakeLists.txt b/test/gtest/CMakeLists.txt index be183ee5d085cf8d0378a303906edc2268b281a3..e4cad2dcf8253370f4f59bb3d23fe898cbe3860e 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()