diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8e71dcd..8acbc4a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,17 +1,6 @@ cmake_minimum_required(VERSION 3.20) -# ======================================== -# GoogleTest 集成 -# ======================================== -include(FetchContent) -FetchContent_Declare( - googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG v1.14.0 -) -# Windows 兼容性设置 -set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -FetchContent_MakeAvailable(googletest) +find_package(gtest CONFIG REQUIRED) # 启用测试 enable_testing()