summaryrefslogtreecommitdiffstats
path: root/Source/cmElseCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-01-02 21:46:08 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-01-02 21:46:08 (GMT)
commite07ea14e31e1d91632bdd5d56124ab394042f0d1 (patch)
treed5628ce0b9dd99aacdc708f59f92d0893f79e57d /Source/cmElseCommand.cxx
parentb4e27e979556e89dc6bb6c8517cc71d20a717c69 (diff)
downloadCMake-e07ea14e31e1d91632bdd5d56124ab394042f0d1.zip
CMake-e07ea14e31e1d91632bdd5d56124ab394042f0d1.tar.gz
CMake-e07ea14e31e1d91632bdd5d56124ab394042f0d1.tar.bz2
added exists option for if statement
Diffstat (limited to 'Source/cmElseCommand.cxx')
-rw-r--r--Source/cmElseCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmElseCommand.cxx b/Source/cmElseCommand.cxx
index 7daca42..c04dbeb 100644
--- a/Source/cmElseCommand.cxx
+++ b/Source/cmElseCommand.cxx
@@ -73,6 +73,14 @@ bool cmElseCommand::InitialPass(std::vector<std::string> const& args)
}
}
+ if (args.size() == 2 && (args[0] == "EXISTS"))
+ {
+ if(cmSystemTools::FileExists(args[1].c_str()))
+ {
+ f = new cmIfFunctionBlocker();
+ }
+ }
+
if (args.size() == 2 && (args[0] == "NOT"))
{
def = m_Makefile->GetDefinition(args[1].c_str());