summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-06-20 14:39:58 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-06-20 14:39:58 (GMT)
commit20d9083455459e179f7da5e3d1228609bb3231e7 (patch)
tree989bab213f8101b2965c67ce8fab734d124978de
parent159338bcf89fdeb01549af36e2694b813c6a6de2 (diff)
downloadCMake-20d9083455459e179f7da5e3d1228609bb3231e7.zip
CMake-20d9083455459e179f7da5e3d1228609bb3231e7.tar.gz
CMake-20d9083455459e179f7da5e3d1228609bb3231e7.tar.bz2
modified MATCHES to handle non variables
-rw-r--r--Source/cmElseCommand.cxx6
-rw-r--r--Source/cmIfCommand.cxx6
2 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmElseCommand.cxx b/Source/cmElseCommand.cxx
index 5451004..ad11fe7 100644
--- a/Source/cmElseCommand.cxx
+++ b/Source/cmElseCommand.cxx
@@ -145,10 +145,14 @@ bool cmElseCommand::InitialPass(std::vector<std::string> const& args)
if (args.size() == 3 && (args[1] == "MATCHES"))
{
def = m_Makefile->GetDefinition(args[0].c_str());
+ if (!def)
+ {
+ def = args[0].c_str();
+ }
cmRegularExpression regEntry(args[2].c_str());
// check for black line or comment
- if (def && regEntry.find(def))
+ if (regEntry.find(def))
{
f = new cmIfFunctionBlocker();
}
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 85cb98d..2a36853 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -140,10 +140,14 @@ bool cmIfCommand::InitialPass(std::vector<std::string> const& args)
if (args.size() == 3 && (args[1] == "MATCHES"))
{
def = m_Makefile->GetDefinition(args[0].c_str());
+ if (!def)
+ {
+ def = args[0].c_str();
+ }
cmRegularExpression regEntry(args[2].c_str());
// check for black line or comment
- if (!def || !regEntry.find(def))
+ if (!regEntry.find(def))
{
f = new cmIfFunctionBlocker();
}