Commit 15d98a42 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

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.
parent 9b294087
......@@ -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 =
return std::find(mappedConfigs.begin(), mappedConfigs.end(),
context->Config) != mappedConfigs.end() ? "1" : "0";
!= mappedConfigs.end() ? "1" : "0";
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment