diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-08-27 13:36:57 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-08-27 13:36:57 (GMT) |
commit | 15d98a42fd2b7cadfdbc9268da3c79f389c5a3cc (patch) | |
tree | ecccc7e38c89ee3f7bd065a293f19380a95d4282 | |
parent | 9b2940875e51457c77dd946b18b1314a6904454d (diff) | |
download | CMake-15d98a42fd2b7cadfdbc9268da3c79f389c5a3cc.zip CMake-15d98a42fd2b7cadfdbc9268da3c79f389c5a3cc.tar.gz CMake-15d98a42fd2b7cadfdbc9268da3c79f389c5a3cc.tar.bz2 |
Genex: Fix evaluation of MAP_IMPORTED_CONFIG_<CONFIG>
Commit 10a069b5 (Genex: Fix $<CONFIG> with IMPORTED targets and
multiple locations., 2013-07-15) changed the logic here to include
handling of the MAP_IMPORTED_CONFIG_<CONFIG> target property, but
it was buggy in several ways.
Uppercase the configs in all cases, and compare the mapped configs
with the parameter to the CONFIG genex, instead of with the key of
the mapping.
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index e0c8c9e..abe4e70 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -574,14 +574,15 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode // Check if there is a proper config mapping for the tested config. std::vector<std::string> mappedConfigs; std::string mapProp = "MAP_IMPORTED_CONFIG_"; - mapProp += context->Config; + mapProp += cmSystemTools::UpperCase(context->Config); if(const char* mapValue = context->CurrentTarget->GetProperty(mapProp.c_str())) { cmSystemTools::ExpandListArgument(cmSystemTools::UpperCase(mapValue), mappedConfigs); return std::find(mappedConfigs.begin(), mappedConfigs.end(), - context->Config) != mappedConfigs.end() ? "1" : "0"; + cmSystemTools::UpperCase(parameters.front())) + != mappedConfigs.end() ? "1" : "0"; } } } |