ENH: Added option to IF command to test if a command exists. Syntax is IF(COMMAND name-of-command).

This commit is contained in:
Brad King 2001-12-18 09:51:18 -05:00
parent fd37e46eb3
commit 16b0571d93
1 changed files with 8 additions and 0 deletions

View File

@ -65,6 +65,14 @@ bool cmElseCommand::InitialPass(std::vector<std::string> const& args)
}
}
if (args.size() == 2 && (args[0] == "COMMAND"))
{
if(m_Makefile->CommandExists(args[1].c_str()))
{
f = new cmIfFunctionBlocker();
}
}
if (args.size() == 2 && (args[0] == "NOT"))
{
def = m_Makefile->GetDefinition(args[1].c_str());