include(FetchContent) FetchContent_Declare( gtest GIT_REPOSITORY https://gitee.com/mirrors/googletest.git SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/gtest ) FetchContent_MakeAvailable(gtest)