summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2001-12-18 14:51:18 (GMT)
committerBrad King <brad.king@kitware.com>2001-12-18 14:51:18 (GMT)
commit16b0571d93a5f51caf4e55a2502b74e6cab9c78d (patch)
tree2cda3d79f7e1d7148273ab9a0ccd0d0fa73265fa /Source
parentfd37e46eb31a418302ba789fa99bb807cf2b5450 (diff)
downloadCMake-16b0571d93a5f51caf4e55a2502b74e6cab9c78d.zip
CMake-16b0571d93a5f51caf4e55a2502b74e6cab9c78d.tar.gz
CMake-16b0571d93a5f51caf4e55a2502b74e6cab9c78d.tar.bz2
ENH: Added option to IF command to test if a command exists. Syntax is IF(COMMAND name-of-command).
Diffstat (limited to 'Source')
-rw-r--r--Source/cmElseCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmElseCommand.cxx b/Source/cmElseCommand.cxx
index 12847cf..7daca42 100644
--- a/Source/cmElseCommand.cxx
+++ b/Source/cmElseCommand.cxx
@@ -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());