-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
docs: when to use CMakeToolchain's variable choices #13971
docs: when to use CMakeToolchain's variable choices #13971
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Just as a note the policies that are currently being set with cache variables will go away with the next client since there was a fix :) |
This comment has been minimized.
This comment has been minimized.
1 similar comment
Conan v1 pipeline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR has been triggered again because there are existing changes in |
## CMakeToolchain | ||
|
||
The old `CMake.definition` should be replaced by `CMakeToolchain.variables` and moved to the `generate` method. | ||
However, certain options need to be passed as `cache_variables`. You'll need to check project's `CMakeLists.txt` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I check just project's root CMakeLists.txt
, or all of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on the project... I mean maybe if they have multiple layers with different options and multiple projects all being combined yeah you might possibly need to -- but I have not see that thankfully
I am reading cmake doc:
so, non-cache variables are considered internal, and are not supposed to be modified from the outside. |
The problem here is the language does not come from the variables but the present. So the meaning and invocation are different https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#configure-preset In conan toolchain lingo "cache variables are command line inputs" and "variables are value input before the project is loaded". Both are valid ways but has different magnitudes of importance. This is significant because if a human passes something at the command line - it should take precedence - they should be able to have the final say. In the most general case, of course. Hopefully that clears up things. |
maybe it deserves a better explanation in docs then. but we can add it later, if needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Docs!
trying to capture #13794 (comment)