summaryrefslogtreecommitdiffstats
path: root/Source/cmIfCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-06-23 15:03:57 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-06-23 15:03:57 (GMT)
commitdec5cc1082f92fd1ba56afe9efc596377afc4461 (patch)
tree53f355a7b81db7fb0a311267f7aaaf7b3d7dc359 /Source/cmIfCommand.cxx
parent553f7a04d07aed93ae72148a171ec11d7a1403dd (diff)
downloadCMake-dec5cc1082f92fd1ba56afe9efc596377afc4461.zip
CMake-dec5cc1082f92fd1ba56afe9efc596377afc4461.tar.gz
CMake-dec5cc1082f92fd1ba56afe9efc596377afc4461.tar.bz2
ENH: converted macro to use variables and fixed some case issues with some function blockers
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r--Source/cmIfCommand.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 36bc35f..cf5bc82 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -25,19 +25,20 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
const char* name = lff.m_Name.c_str();
const std::vector<cmListFileArgument>& args = lff.m_Arguments;
// always let if statements through
- if (!strcmp(name,"IF"))
+ if (cmSystemTools::LowerCase(lff.m_Name) == "if")
{
return false;
}
// watch for our ELSE or ENDIF
- if (!strcmp(name,"ELSE") || !strcmp(name,"ENDIF"))
+ if (cmSystemTools::LowerCase(lff.m_Name) == "else" ||
+ cmSystemTools::LowerCase(lff.m_Name) == "endif")
{
if (args == m_Args)
{
// if it was an else statement then we should change state
// and block this Else Command
- if (!strcmp(name,"ELSE"))
+ if (cmSystemTools::LowerCase(lff.m_Name) == "else")
{
m_IsBlocking = !m_IsBlocking;
return true;
@@ -72,7 +73,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
bool cmIfFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
cmMakefile&)
{
- if (lff.m_Name == "ENDIF")
+ if (cmSystemTools::LowerCase(lff.m_Name) == "endif")
{
if (lff.m_Arguments == m_Args)
{