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

Allows set/set(CACHE) to behave the same as set(X)/option(x) #335

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

robertmaynard
Copy link
Contributor

By enabling CMP0126 we tell CMake that when constructing a CACHE variable
with the same name as a local variable to not unset the local variable.

By enabling CMPO126 it makes sure that CPM behavior around OPTION is
consistent if the option is created with set(CACHE) or with option.

By enabling CMP0126 we tell CMake that when constructing a CACHE variable
with the same name as a local variable to not unset the local variable.

By enabling CMPO126 it makes sure that CPM behavior around `OPTION` is
consistent if the option is created with `set(CACHE)` or with `option`.
cmake/CPM.cmake Outdated Show resolved Hide resolved
@iboB
Copy link
Member

iboB commented Jan 27, 2022

I'm generally in favor of the policy being set, but not of adding NVIDIA to the copyright in CPM.cmake. If we were to add every single contributor, the copyright notice could end up being longer than the actual code.

Still, having an external file which lists all contributors is probably not a bad idea

@robertmaynard
Copy link
Contributor Author

I'm generally in favor of the policy being set, but not of adding NVIDIA to the copyright in CPM.cmake. If we were to add every single contributor, the copyright notice could end up being longer than the actual code.

Still, having an external file which lists all contributors is probably not a bad idea

I have removed that modification while you work out a better way to list contributors. Thank you

@TheLartians
Copy link
Member

TheLartians commented Jan 27, 2022

Hey, thanks for the PR, setting the policy definitely looks like a good idea! As for the contributors, I'd be interested how other projects handle this. In general, I wouldn't be opposed to adding a contributors file (and referencing it from the licence), where we can give credit to the people / organisations that have helped with the project.

@TheLartians TheLartians merged commit 4f7af69 into cpm-cmake:master Jan 27, 2022
@iboB iboB mentioned this pull request Jan 28, 2022
@robertmaynard robertmaynard deleted the add_cmp0126_to_option branch January 28, 2022 16:36
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.

3 participants