summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmForEachCommand.cxx6
-rw-r--r--Source/cmIfCommand.cxx10
-rw-r--r--Source/cmMacroCommand.cxx6
-rw-r--r--Source/cmWhileCommand.cxx6
4 files changed, 14 insertions, 14 deletions
diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index 5f03c43..0d9bc7a 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -26,12 +26,12 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
return false;
}
- if (cmSystemTools::LowerCase(lff.Name) == "foreach")
+ if (!cmSystemTools::Strucmp(lff.Name.c_str(),"foreach"))
{
// record the number of nested foreach commands
this->Depth++;
}
- else if (cmSystemTools::LowerCase(lff.Name) == "endforeach")
+ else if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endforeach"))
{
// if this is the endofreach for this statement
if (!this->Depth)
@@ -81,7 +81,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
bool cmForEachFunctionBlocker::
ShouldRemove(const cmListFileFunction& lff, cmMakefile& mf)
{
- if(cmSystemTools::LowerCase(lff.Name) == "endforeach")
+ if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endforeach"))
{
std::vector<std::string> expandedArguments;
mf.ExpandArguments(lff.Arguments, expandedArguments);
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 2644857..e745735 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -23,18 +23,18 @@ bool cmIfFunctionBlocker::
IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
{
// always let if statements through
- if (cmSystemTools::LowerCase(lff.Name) == "if")
+ if (!cmSystemTools::Strucmp(lff.Name.c_str(),"if"))
{
return false;
}
// watch for our ELSE or ENDIF
- if (cmSystemTools::LowerCase(lff.Name) == "else" ||
- cmSystemTools::LowerCase(lff.Name) == "endif")
+ if (!cmSystemTools::Strucmp(lff.Name.c_str(),"else") ||
+ !cmSystemTools::Strucmp(lff.Name.c_str(),"endif"))
{
// if it was an else statement then we should change state
// and block this Else Command
- if (cmSystemTools::LowerCase(lff.Name) == "else")
+ if (!cmSystemTools::Strucmp(lff.Name.c_str(),"else"))
{
this->IsBlocking = !this->IsBlocking;
return true;
@@ -51,7 +51,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
bool cmIfFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
cmMakefile& mf)
{
- if (cmSystemTools::LowerCase(lff.Name) == "endif")
+ if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif"))
{
if (mf.IsOn("CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS")
|| lff.Arguments == this->Args)
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index ca86b3b..e4de342 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -252,11 +252,11 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
{
// record commands until we hit the ENDMACRO
// at the ENDMACRO call we shift gears and start looking for invocations
- if(cmSystemTools::LowerCase(lff.Name) == "macro")
+ if(!cmSystemTools::Strucmp(lff.Name.c_str(),"macro"))
{
this->Depth++;
}
- else if(cmSystemTools::LowerCase(lff.Name) == "endmacro")
+ else if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endmacro"))
{
// if this is the endmacro for this macro then execute
if (!this->Depth)
@@ -300,7 +300,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
bool cmMacroFunctionBlocker::
ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf)
{
- if(cmSystemTools::LowerCase(lff.Name) == "endmacro")
+ if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endmacro"))
{
std::vector<std::string> expandedArguments;
mf.ExpandArguments(lff.Arguments, expandedArguments);
diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx
index f99a2da..eccd73e 100644
--- a/Source/cmWhileCommand.cxx
+++ b/Source/cmWhileCommand.cxx
@@ -28,12 +28,12 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
}
// at end of for each execute recorded commands
- if (cmSystemTools::LowerCase(lff.Name) == "while")
+ if (!cmSystemTools::Strucmp(lff.Name.c_str(),"while"))
{
// record the number of while commands past this one
this->Depth++;
}
- else if (cmSystemTools::LowerCase(lff.Name) == "endwhile")
+ else if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endwhile"))
{
// if this is the endwhile for this while loop then execute
if (!this->Depth)
@@ -78,7 +78,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
bool cmWhileFunctionBlocker::
ShouldRemove(const cmListFileFunction& lff, cmMakefile& mf)
{
- if(cmSystemTools::LowerCase(lff.Name) == "endwhile")
+ if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endwhile"))
{
if (lff.Arguments == this->Args
|| mf.IsOn("CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS"))