Repository navigation
Use namespaced CMake variables. Deprecated old values - #2070
Merged
Merged
Conversation
Member
|
@umar456 Why are the below tests failing with this change? They don't fail anywhere usually. |
9prady9
reviewed
Feb 26, 2018
| function(af_deprecate var newvar) | ||
| if(DEFINED ${var}) | ||
| message(DEPRECATION "Variable ${var} is deprecated. Use ${newvar} instead.") | ||
| get_property(doc CACHE ${newvar} PROPERTY HELPSTRING) |
Member
There was a problem hiding this comment.
where is this doc defined ? Is it predefined ? I didn't find any reference to it in root cmake script or here.
Member
Author
There was a problem hiding this comment.
Its the variable where the get_property command stores the HELPSTRING for the ${newvar} variable.
Member
|
Changes look good. |
This commit deprecates the old CMake variables in favor of variables that are namespaced with the AF_ prefix to avoid name conflicts with user code. If the old variables are used a warning is displayed and the new variable is set to the value. The old variable is unset to avoid showing the warning again.
umar456
force-pushed
the
deprecate_vars
branch
from
February 26, 2018 12:44
71d83fc to
1653531
Compare
9prady9
approved these changes
Feb 26, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit deprecates the old CMake variables in favor of variables with
AF_prefix to avoid name conflicts with user code. If the old variables are used a warning is displayed and the new variable is set to the value. The old variable is unset to avoid showing the warning again.