summaryrefslogtreecommitdiffstats
path: root/Source/cmElseIfCommand.h
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-09-22 15:23:51 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-09-22 15:23:51 (GMT)
commit5e46232ad8f6667e1e9a62b11ce4524097ad085a (patch)
tree9289ba7495116114ff7ea201c2bc18a8bb43ab05 /Source/cmElseIfCommand.h
parentc27e9fd656fce1b0ea2bd53ddf85c711c14813d9 (diff)
downloadCMake-5e46232ad8f6667e1e9a62b11ce4524097ad085a.zip
CMake-5e46232ad8f6667e1e9a62b11ce4524097ad085a.tar.gz
CMake-5e46232ad8f6667e1e9a62b11ce4524097ad085a.tar.bz2
ENH: added elseif
Diffstat (limited to 'Source/cmElseIfCommand.h')
-rw-r--r--Source/cmElseIfCommand.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/Source/cmElseIfCommand.h b/Source/cmElseIfCommand.h
new file mode 100644
index 0000000..ca6b1f4
--- /dev/null
+++ b/Source/cmElseIfCommand.h
@@ -0,0 +1,76 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef cmElseIfCommand_h
+#define cmElseIfCommand_h
+
+#include "cmIfCommand.h"
+
+/** \class cmElseIfCommand
+ * \brief ends an if block
+ *
+ * cmElseIfCommand ends an if block
+ */
+class cmElseIfCommand : public cmCommand
+{
+public:
+ /**
+ * This is a virtual constructor for the command.
+ */
+ virtual cmCommand* Clone()
+ {
+ return new cmElseIfCommand;
+ }
+
+ /**
+ * This is called when the command is first encountered in
+ * the CMakeLists.txt file.
+ */
+ virtual bool InitialPass(std::vector<std::string> const& args);
+
+ /**
+ * This determines if the command is invoked when in script mode.
+ */
+ virtual bool IsScriptable() { return true; }
+
+ /**
+ * The name of the command as specified in CMakeList.txt.
+ */
+ virtual const char* GetName() { return "ELSEIF";}
+
+ /**
+ * Succinct documentation.
+ */
+ virtual const char* GetTerseDocumentation()
+ {
+ return "Starts the ELSEIF portion of an IF block.";
+ }
+
+ /**
+ * More documentation.
+ */
+ virtual const char* GetFullDocumentation()
+ {
+ return
+ " ELSEIF(expression)\n"
+ "See the IF command.";
+ }
+
+ cmTypeMacro(cmElseIfCommand, cmCommand);
+};
+
+
+#endif