summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-12-26 14:59:55 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-08 15:41:34 (GMT)
commit6aabb6a62b679f64e278087fc671cd33a35bf871 (patch)
treeabf9f40e80fd8577e3cdda4fcd8a8cfd0b6b2037 /Source
parent5bb53f6b731228e4592066329e8992987289a986 (diff)
downloadCMake-6aabb6a62b679f64e278087fc671cd33a35bf871.zip
CMake-6aabb6a62b679f64e278087fc671cd33a35bf871.tar.gz
CMake-6aabb6a62b679f64e278087fc671cd33a35bf871.tar.bz2
Genex: Use case-sensitive comparison for COMPILER_ID.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx24
-rw-r--r--Source/cmPolicies.cxx5
-rw-r--r--Source/cmPolicies.h1
3 files changed, 29 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";
}
};
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 32c1476..c9dacaf 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -321,6 +321,11 @@ cmPolicies::cmPolicies()
CMP0043, "CMP0043",
"Ignore COMPILE_DEFINITIONS_<Config> properties.",
3,0,0,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0044, "CMP0044",
+ "Case sensitive <LANG>_COMPILER_ID generator expressions.",
+ 3,0,0,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 3c8200f..0d7327f 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -97,6 +97,7 @@ public:
CMP0041, ///< Error on relative include with generator expression
CMP0042, ///< Enable MACOSX_RPATH by default
CMP0043, ///< Ignore COMPILE_DEFINITIONS_<Config> properties
+ CMP0044, ///< Case sensitive <LANG>_COMPILER_ID generator expressions
/** \brief Always the last entry.
*