diff options
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r-- | Source/cmIfCommand.cxx | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 2146a5e..85cb98d 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -149,6 +149,62 @@ bool cmIfCommand::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 we created a function blocker then set its args if (f) { |