mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-20 06:00:30 -06:00
Genex: Use case-sensitive comparison for COMPILER_ID.
This commit is contained in:
@@ -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";
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user