summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-22 15:03:40 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-22 15:29:52 (GMT)
commit764775c4dd7b97e753d566d363c7ce9968343b5b (patch)
tree234b5d5e55bb082351577a92d552d65dca4074aa /Source/cmTarget.cxx
parentf4475eb92beade22fca16f21b40df19b48c6559b (diff)
downloadCMake-764775c4dd7b97e753d566d363c7ce9968343b5b.zip
CMake-764775c4dd7b97e753d566d363c7ce9968343b5b.tar.gz
CMake-764775c4dd7b97e753d566d363c7ce9968343b5b.tar.bz2
Fix XCODE_ATTRIBUTE_..._LOCATION target property lookup
Refactoring in commit v3.5.0-rc1~272^2~16 (cmGeneratorTarget: Add API for property keys, 2015-10-25) changed the Xcode generator implementation of `XCODE_ATTRIBUTE_...` properties to use the target `GetProperty` method on each `XCODE_ATTRIBUTE_...` property listed by `GetPropertyKeys` instead of looping over the property entries directly. This made the lookup of property names of the form `XCODE_ATTRIBUTE_..._LOCATION` accidentally trigger the computed property logic for the undocumented/legacy `<CONFIG>_LOCATION` property. Of course the computed property value is not the same as the value stored in the `XCODE_ATTRIBUTE_..._LOCATION` property. Fix the computed property logic to avoid triggering on `XCODE_ATTRIBUTE_...` attributes. Closes: #16319
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1dad742..eb17561 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1164,7 +1164,8 @@ const char* cmTarget::GetProperty(const std::string& prop,
}
}
// Support "<CONFIG>_LOCATION".
- else if (cmHasLiteralSuffix(prop, "_LOCATION")) {
+ else if (cmHasLiteralSuffix(prop, "_LOCATION") &&
+ !cmHasLiteralPrefix(prop, "XCODE_ATTRIBUTE_")) {
std::string configName(prop.c_str(), prop.size() - 9);
if (configName != "IMPORTED") {
if (!this->HandleLocationPropertyPolicy(context)) {