From 68f2e2dee2d2ee79ba8e064fc367039dc7795fca Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Fri, 12 Sep 2025 01:32:15 -0700 Subject: [PATCH] Fix FetchContent_Declare speed (#1875) --- cmake/FindGoogleTest.cmake | 1 + dCommon/CMakeLists.txt | 1 + thirdparty/CMakeLists.txt | 2 ++ 3 files changed, 4 insertions(+) diff --git a/cmake/FindGoogleTest.cmake b/cmake/FindGoogleTest.cmake index db0bfb77..7c2ad9e0 100644 --- a/cmake/FindGoogleTest.cmake +++ b/cmake/FindGoogleTest.cmake @@ -7,6 +7,7 @@ FetchContent_Declare( GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG release-1.12.1 GIT_PROGRESS TRUE + GIT_SHALLOW 1 ) # For Windows: Prevent overriding the parent project's compiler/linker settings diff --git a/dCommon/CMakeLists.txt b/dCommon/CMakeLists.txt index 2945d3db..ba67974e 100644 --- a/dCommon/CMakeLists.txt +++ b/dCommon/CMakeLists.txt @@ -55,6 +55,7 @@ elseif (WIN32) URL https://github.com/madler/zlib/archive/refs/tags/v1.2.11.zip URL_HASH MD5=9d6a627693163bbbf3f26403a3a0b0b1 GIT_PROGRESS TRUE + GIT_SHALLOW 1 ) # Disable warning about no project version. diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index 46f9e45c..fe72f2da 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -49,6 +49,7 @@ if(UNIX AND NOT APPLE) backtrace GIT_REPOSITORY https://github.com/ianlancetaylor/libbacktrace.git GIT_PROGRESS TRUE + GIT_SHALLOW 1 ) FetchContent_MakeAvailable(backtrace) @@ -71,6 +72,7 @@ FetchContent_Declare( GIT_REPOSITORY https://github.com/g-truc/glm.git GIT_TAG bf71a834948186f4097caa076cd2663c69a10e1e #refs/tags/1.0.1 GIT_PROGRESS TRUE + GIT_SHALLOW 1 ) FetchContent_MakeAvailable(glm)