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