Skip to content
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

Honour new relative git URL behaviour controlled by CMP0150 #520

Closed
inkychris opened this issue Nov 17, 2023 · 2 comments · Fixed by #522
Closed

Honour new relative git URL behaviour controlled by CMP0150 #520

inkychris opened this issue Nov 17, 2023 · 2 comments · Fixed by #522

Comments

@inkychris
Copy link
Contributor

I added support for relative git URLs to FetchContent/ExternalProject which was introduced in cmake v3.27 under policy CMP0150. Unfortunately, this doesn't seem to work when wrapped with CPM and it looks like this is because CPM minimum cmake version is set to 3.14.

I'm not sure on the best strategy here, but one option would be for CPM to inherit the policies from the parent project, and just assert that they're set at least to a minimum of 3.14 as CPM needs, rather than actually explicitly setting them to 3.14 as is currently the case. Alternatively, it should at least honour policy 150 and pass it through if it can.

Happy to submit a PR for this if there's a preferred solution.

@TheLartians
Copy link
Member

Hey, thanks for raising the issue, I agree that it would make sense for CPM to honour the new policy. Currently we handle overriding policies inside a dedicated macro (see here for discussion), which would be the preferred location to enable CMP0150. Would be very happy to review a PR for this!

@inkychris
Copy link
Contributor Author

Sure thing, I'll submit a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants