Skip to content

CPM.cmake redundant return() removed - #622

Open
artiomn wants to merge 1 commit into
cpm-cmake:masterfrom
artiomn:master
Open

artiomn wants to merge 1 commit into
cpm-cmake:masterfrom
artiomn:master

Conversation

@artiomn

@artiomn artiomn commented Nov 21, 2024

Copy link
Copy Markdown

CPM can work, but this return stop to loading script and functions are unavailable.

CPM can work, but this return stop to loading script and functions are unavailable.
@TheLartians

Copy link
Copy Markdown
Member

Hey, thanks for the PR! I'm not quite sure I understand implication of the change however. The intent of the early return is that if CPM is already loaded by a downstream dependency we don't overwrite the current CPM with another version and loose all state variables etc. Maybe it would be more clear if you can create a test case that fails with the current version?

@artiomn

artiomn commented Jan 4, 2025

Copy link
Copy Markdown
Author

Yes, and problem is here: some dependency uses CPM and my project uses CPM.
After loading dependency CPM doesn't initialized in the my CMakeLists.
And I can't use it in my project.

I've had this problem in the real project.
If it will be repeated, I'll try to make test example.

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 this pull request may close these issues.

2 participants