CPM.cmake icon indicating copy to clipboard operation
CPM.cmake copied to clipboard

CPM does not progress with git 2.50.0.windows.1

Open Laguna1989 opened this issue 6 months ago • 2 comments

I have the following code in my CMakeLists.txt

file(
        DOWNLOAD
        https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.5/CPM.cmake
        ${CMAKE_BINARY_DIR}/cmake/CPM.cmake
        EXPECTED_HASH SHA256=c46b876ae3b9f994b4f05a4c15553e0485636862064f1fcc9d8b4f832086bc5d
)
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)

message(STATUS "Fetching catch2")
CPMAddPackage(
		NAME catch2
		GITHUB_REPOSITORY catchorg/Catch2
		GIT_TAG v3.8.1
)

After upgrading to git 2.50.0.windows.1, the process of fetching externals hangs, with the last line being

-- CPM: Adding package [email protected] (v3.8.1)

Downgrading to git 2.49.0.windows.1 solves the issue.

Using the usual git commands in a non-CPM context works as expected without any issues.

Laguna1989 avatar Jun 17 '25 08:06 Laguna1989

This is a rather old version of CPM that you're using. Changes to the use of FetchContent were implemented since then.

Does the problem persist if you switch to a newer CPM version? As in:

file(
        DOWNLOAD
        https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.42.0/CPM.cmake
        ${CMAKE_BINARY_DIR}/cmake/CPM.cmake
        EXPECTED_HASH SHA256=2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a
)

iboB avatar Jun 24 '25 13:06 iboB

I just updated my Windows box to git 2.50.0.windows.1 and I can't reproduce this with a new CPM version

iboB avatar Jun 25 '25 07:06 iboB