Open DNKpp opened 1 month ago
This is a bug in CMake which was resolved in version 3.30.3: CMake Issue 26243. The bug also affects older versions of CMake.
For context: CMake 3.30 deprecates a function signature that CPM versions earlier than 0.40.1 used to add packages. This was addressed in CPM 0.40.1 to align with CMake's new expectations. See pr #570 for more details.
When I implemented the fixes in #570, I aimed to use the "new method" with the earliest CMake version that supported it, which was 3.28. However, now that I’m aware of the bug in these versions, I think it would be the best to update the version checks from 3.28 to 3.30, where the deprecation warnings actually begin. Although CMake versions 3.30.0 - 3.30.2 still contain the bug, it's easier to upgrade from 3.30.0 to 3.30.3 than from 3.28 to 3.30.3.
PS:
Windows should also be effected. The log from your action looked weird: CPM: Adding package GTest@0 (1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2)
. Haven't looked further, maybe it's expected :)
Thank you for your explanation, but unfortunantly I have still no idea how that can be the root cause for the non-existing input template. But either way. If it's the reason, I'm fine with the fix :) Thank you!
Windows should also be effected. The log from your action looked weird:
CPM: Adding package GTest@0 (1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2)
. Haven't looked further, maybe it's expected :)
Well, I don't think so. In that runner I've selected an actual git commit hash. Seems fine too me. But as I use gtest
just for the dedicated adapter test, I use the very minimal of it. For my actual unit-test I'm using catch2
.
As the title already states, my project fails configuring when upgrading CPM to Version
0.40.1
and beyond, due to this error:This is just the output from my minimal example. If you want to have a look at my actual project output, here is the relevant gh-action run: https://github.com/DNKpp/mimicpp/actions/runs/10965745313 This happens to be the case for all linux based machines, I've tested it (also some local docker containers).
I'll attach the minimal example: cpm_test.zip