diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-12-26 14:59:55 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-01-08 15:41:34 (GMT) |
commit | 6aabb6a62b679f64e278087fc671cd33a35bf871 (patch) | |
tree | abf9f40e80fd8577e3cdda4fcd8a8cfd0b6b2037 /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | 5bb53f6b731228e4592066329e8992987289a986 (diff) | |
download | CMake-6aabb6a62b679f64e278087fc671cd33a35bf871.zip CMake-6aabb6a62b679f64e278087fc671cd33a35bf871.tar.gz CMake-6aabb6a62b679f64e278087fc671cd33a35bf871.tar.bz2 |
Genex: Use case-sensitive comparison for COMPILER_ID.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 80b16d3..1feb03a 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -412,10 +412,32 @@ struct CompilerIdNode : public cmGeneratorExpressionNode return parameters.front().empty() ? "1" : "0"; } - if (cmsysString_strcasecmp(parameters.begin()->c_str(), compilerId) == 0) + if (strcmp(parameters.begin()->c_str(), compilerId) == 0) { return "1"; } + + if (cmsysString_strcasecmp(parameters.begin()->c_str(), compilerId) == 0) + { + switch(context->Makefile->GetPolicyStatus(cmPolicies::CMP0044)) + { + case cmPolicies::WARN: + { + cmOStringStream e; + e << context->Makefile->GetPolicies() + ->GetPolicyWarning(cmPolicies::CMP0044); + context->Makefile->GetCMakeInstance() + ->IssueMessage(cmake::AUTHOR_WARNING, + e.str().c_str(), context->Backtrace); + } + case cmPolicies::OLD: + return "1"; + case cmPolicies::NEW: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + break; + } + } return "0"; } }; |