From 16b0571d93a5f51caf4e55a2502b74e6cab9c78d Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 18 Dec 2001 09:51:18 -0500 Subject: ENH: Added option to IF command to test if a command exists. Syntax is IF(COMMAND name-of-command). --- Source/cmElseCommand.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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 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()); -- cgit v0.12