-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GTest configuration fails as of CPM version 0.40.1
#603
Comments
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: |
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!
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 |
cpm-cmake/CPM.cmake#603 Signed-off-by: Kai-Uwe Hermann <[email protected]>
* Workaround for a bug affecting CMake < 3.30.3 and CPM > 0.40.1 cpm-cmake/CPM.cmake#603 * Unset ${PACKAGE}_SOURCE_DIR before calling add_subirectory When a ${PACKAGE}_SOURCE_DIR is set before project() is called projects where the name and project-dir-name differ, like "gtest" for "googletest" in everest-core seem to have the wrong ${PACKAGE}_SOURCE_DIR set after the project() call * Bump version to 0.5.1 --------- Signed-off-by: Kai-Uwe Hermann <[email protected]>
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
The text was updated successfully, but these errors were encountered: