diff options
author | Brad King <brad.king@kitware.com> | 2001-12-18 14:51:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-12-18 14:51:18 (GMT) |
commit | 16b0571d93a5f51caf4e55a2502b74e6cab9c78d (patch) | |
tree | 2cda3d79f7e1d7148273ab9a0ccd0d0fa73265fa /Source | |
parent | fd37e46eb31a418302ba789fa99bb807cf2b5450 (diff) | |
download | CMake-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.cxx | 8 |
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()); |