Skip to content

Understanding CMakePresets.json inheritance rules #2572

Closed Answered by bobbrow
daldr-ntml asked this question in Q&A
Discussion options

You must be logged in to vote

Q1 - Values are overridden at the lower level, not at the object level (at least for cacheVariables and environment), so having different variables defined inside cacheVariables should result in a merged cacheVariables with both PROJECT_VARIANTandCMAKE_BUILD_TYPE` defined.

Q2 - I would expect the same rules from Q1 to apply here, so for the example provided, I would not expect anything to be removed from the vendor settings because omitting a property is not deleting it. To delete settings you set them to null, though I don't know how well this was tested across all the properties and it's possible that there could be bugs here. I need to dig into this a bit more to see what Visual Studio…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@daldr-ntml
Comment options

Answer selected by daldr-ntml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants