-- workaround for https://github.com/softwareQinc/qpp/issues/171 --- unit_tests/CMakeLists.txt.orig 2026-03-14 20:42:02 UTC +++ unit_tests/CMakeLists.txt @@ -1,13 +1,6 @@ set(TARGET_NAME "unit_tests") set(TARGET_NAME "unit_tests") -include(FetchContent) -message(STATUS "Fetching GoogleTest...") -FetchContent_Declare( - googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG main - GIT_PROGRESS TRUE - GIT_SHALLOW TRUE) +find_package(GTest REQUIRED) if(MSVC) # Ensure Google Test uses the Shared C Runtime (/MD or /MDd) to prevent linker @@ -20,8 +13,6 @@ endif() CACHE BOOL "Force Google Test to use shared C Runtime on MSVC" FORCE) endif() -FetchContent_MakeAvailable(googletest) - file(GLOB_RECURSE TEST_SOURCES "tests/*.cpp" "tests/MATLAB/*.cpp" "tests/classes/*.cpp" "tests/qasm/*.cpp")