summaryrefslogtreecommitdiffstats
path: root/Source/cmOptionCommand.h
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-04-23 20:33:24 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-04-23 20:33:24 (GMT)
commitb49204ab0db3e6eae2f346f0f2a3a67517dae80c (patch)
tree95a3d4ba83fa77e2aa5df337201fe620a3560bfa /Source/cmOptionCommand.h
parent8852ed9d2f491288fa61d4babf6250a4f043503b (diff)
downloadCMake-b49204ab0db3e6eae2f346f0f2a3a67517dae80c.zip
CMake-b49204ab0db3e6eae2f346f0f2a3a67517dae80c.tar.gz
CMake-b49204ab0db3e6eae2f346f0f2a3a67517dae80c.tar.bz2
new command
Diffstat (limited to 'Source/cmOptionCommand.h')
-rw-r--r--Source/cmOptionCommand.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h
new file mode 100644
index 0000000..bb1bcb7
--- /dev/null
+++ b/Source/cmOptionCommand.h
@@ -0,0 +1,78 @@
+/*=========================================================================
+
+ Program: Insight Segmentation & Registration Toolkit
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+
+ Copyright (c) 2000 National Library of Medicine
+ All rights reserved.
+
+ See COPYRIGHT.txt for copyright details.
+
+=========================================================================*/
+#ifndef cmOptionCommand_h
+#define cmOptionCommand_h
+
+#include "cmStandardIncludes.h"
+#include "cmCommand.h"
+
+/** \class cmOptionCommand
+ * \brief Provide an option to the user
+ *
+ * cmOptionCommand provides an option for the user to select
+ */
+class cmOptionCommand : public cmCommand
+{
+public:
+ /**
+ * This is a virtual constructor for the command.
+ */
+ virtual cmCommand* Clone()
+ {
+ return new cmOptionCommand;
+ }
+
+ /**
+ * This is called when the command is first encountered in
+ * the CMakeLists.txt file.
+ */
+ virtual bool Invoke(std::vector<std::string>& args);
+
+ /**
+ * This determines if the command gets propagated down
+ * to makefiles located in subdirectories.
+ */
+ virtual bool IsInherited() {return true;}
+
+ /**
+ * The name of the command as specified in CMakeList.txt.
+ */
+ virtual const char* GetName() {return "OPTION";}
+
+ /**
+ * Succinct documentation.
+ */
+ virtual const char* GetTerseDocumentation()
+ {
+ return "Provides an option that the user can optionally select";
+ }
+
+ /**
+ * More documentation.
+ */
+ virtual const char* GetFullDocumentation()
+ {
+ return
+ "OPTION(USE_MPI)\n"
+ "Provide an option for the user to select";
+ }
+
+ cmTypeMacro(cmOptionCommand, cmCommand);
+};
+
+
+
+#endif