diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-12-23 10:20:37 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-01-05 00:18:36 (GMT) |
commit | d0f950fdba88ac08d0e25e340fe558eba008810e (patch) | |
tree | 03b68fa772c5bdec104ba851749365b3bb9fc3de /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | 26def1771dfbf502129212c9e728e34860477fac (diff) | |
download | CMake-d0f950fdba88ac08d0e25e340fe558eba008810e.zip CMake-d0f950fdba88ac08d0e25e340fe558eba008810e.tar.gz CMake-d0f950fdba88ac08d0e25e340fe558eba008810e.tar.bz2 |
Use mapped config properties to evaluate $<CONFIG>
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 4a7a034..8b8b860 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -265,8 +265,24 @@ static const struct ConfigurationTestNode : public cmGeneratorExpressionNode return parameters.front().empty() ? "1" : "0"; } - return cmsysString_strcasecmp(parameters.begin()->c_str(), - context->Config) == 0 ? "1" : "0"; + if (cmsysString_strcasecmp(parameters.begin()->c_str(), + context->Config) == 0) + { + return "1"; + } + + if (context->CurrentTarget + && context->CurrentTarget->IsImported()) + { + const char* loc = 0; + const char* imp = 0; + std::string suffix; + return context->CurrentTarget->GetMappedConfig(context->Config, + &loc, + &imp, + suffix) ? "1" : "0"; + } + return "0"; } } configurationTestNode; |