summaryrefslogtreecommitdiff
path: root/Source/cmElseCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-05-23 10:32:28 -0400
committerKen Martin <ken.martin@kitware.com>2002-05-23 10:32:28 -0400
commit843da9240584edd3eda63ae637891593ae8c729f (patch)
tree2d3b23cdb8f710879431ca341608baaab39246f0 /Source/cmElseCommand.cxx
parent0a3d0d24fd02dd9f126092b0c38c0f22aa3c8bf7 (diff)
downloadcmake-843da9240584edd3eda63ae637891593ae8c729f.tar.gz
adde less greater
Diffstat (limited to 'Source/cmElseCommand.cxx')
-rw-r--r--Source/cmElseCommand.cxx56
1 files changed, 56 insertions, 0 deletions
diff --git a/Source/cmElseCommand.cxx b/Source/cmElseCommand.cxx
index 046fa88fcf..5451004abd 100644
--- a/Source/cmElseCommand.cxx
+++ b/Source/cmElseCommand.cxx
@@ -86,6 +86,62 @@ bool cmElseCommand::InitialPass(std::vector<std::string> const& args)
}
}
+ if (args.size() == 3 && (args[1] == "LESS"))
+ {
+ def = m_Makefile->GetDefinition(args[0].c_str());
+ def2 = m_Makefile->GetDefinition(args[2].c_str());
+ if (!def)
+ {
+ def = args[0].c_str();
+ }
+ if (!def2)
+ {
+ def2 = args[2].c_str();
+ }
+ if(atof(def) < atof(def2))
+ {
+ f = new cmIfFunctionBlocker();
+ }
+ }
+
+ if (args.size() == 3 && (args[1] == "GREATER"))
+ {
+ def = m_Makefile->GetDefinition(args[0].c_str());
+ def2 = m_Makefile->GetDefinition(args[2].c_str());
+ if (!def)
+ {
+ def = args[0].c_str();
+ }
+ if (!def2)
+ {
+ def2 = args[2].c_str();
+ }
+ if(atof(def) > atof(def2))
+ {
+ f = new cmIfFunctionBlocker();
+ }
+ }
+
+ if (args.size() == 3 && (args[1] == "STRLESS"))
+ {
+ def = m_Makefile->GetDefinition(args[0].c_str());
+ def2 = m_Makefile->GetDefinition(args[2].c_str());
+ if(strcmp(def,def2) < 0)
+ {
+ f = new cmIfFunctionBlocker();
+ }
+ }
+
+ if (args.size() == 3 && (args[1] == "STRGREATER"))
+ {
+ def = m_Makefile->GetDefinition(args[0].c_str());
+ def2 = m_Makefile->GetDefinition(args[2].c_str());
+ if(strcmp(def,def2) > 0)
+ {
+ f = new cmIfFunctionBlocker();
+ }
+ }
+
if (args.size() == 3 && (args[1] == "MATCHES"))
{
def = m_Makefile->GetDefinition(args[0].c_str());