diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-10-29 21:21:20 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-10-31 13:52:11 (GMT) |
commit | c4373b33b2ad7c6db3b000b0615ed381f05ac5f3 (patch) | |
tree | 544c5d58dd31df7f06e85f6d060b87146bfbf5a5 /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | cfb666133378d723a046ab7a4463a590deaa7aee (diff) | |
download | CMake-c4373b33b2ad7c6db3b000b0615ed381f05ac5f3.zip CMake-c4373b33b2ad7c6db3b000b0615ed381f05ac5f3.tar.gz CMake-c4373b33b2ad7c6db3b000b0615ed381f05ac5f3.tar.bz2 |
cmTarget: Make GetProperty() const.
This has follow-on effects for other methods and classes. Further
work on making the use of const cmTarget pointers common can be
done, particularly with a view to generate-time methods.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index f92c18e..5374451 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -661,8 +661,8 @@ static const char* targetPropertyTransitiveWhitelist[] = { }; std::string getLinkedTargetsContent(const std::vector<std::string> &libraries, - cmTarget *target, - cmTarget *headTarget, + cmTarget const* target, + cmTarget const* headTarget, cmGeneratorExpressionContext *context, cmGeneratorExpressionDAGChecker *dagChecker, const std::string &interfacePropertyName) @@ -726,7 +726,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode cmsys::RegularExpression propertyNameValidator; propertyNameValidator.compile("^[A-Za-z0-9_]+$"); - cmTarget* target = context->HeadTarget; + cmTarget const* target = context->HeadTarget; std::string propertyName = *parameters.begin(); if (!target && parameters.size() == 1) @@ -914,7 +914,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode interfacePropertyName = "INTERFACE_COMPILE_OPTIONS"; } - cmTarget *headTarget = context->HeadTarget ? context->HeadTarget : target; + cmTarget const* headTarget = context->HeadTarget + ? context->HeadTarget : target; const char * const *transBegin = cmArrayBegin(targetPropertyTransitiveWhitelist) + 1; @@ -1091,7 +1092,8 @@ static const char* targetPolicyWhitelist[] = { #undef TARGET_POLICY_STRING }; -cmPolicies::PolicyStatus statusForTarget(cmTarget *tgt, const char *policy) +cmPolicies::PolicyStatus statusForTarget(cmTarget const* tgt, + const char *policy) { #define RETURN_POLICY(POLICY) \ if (strcmp(policy, #POLICY) == 0) \ |