summaryrefslogtreecommitdiffstats
path: root/Source/cmIncludeCommand.h
diff options
context:
space:
mode:
authorAnonymous <kitware@kitware.com>2001-04-30 14:52:58 (GMT)
committerAnonymous <kitware@kitware.com>2001-04-30 14:52:58 (GMT)
commitd6fae5faf0ec5f0a4d4e4d12424b92c7a6fde22a (patch)
treed31b4f767866387ee4864210fe26515ad22208ce /Source/cmIncludeCommand.h
parent2da0c57d46d5b68e19b60c4e6560fbd80f808ab0 (diff)
downloadCMake-d6fae5faf0ec5f0a4d4e4d12424b92c7a6fde22a.zip
CMake-d6fae5faf0ec5f0a4d4e4d12424b92c7a6fde22a.tar.gz
CMake-d6fae5faf0ec5f0a4d4e4d12424b92c7a6fde22a.tar.bz2
New command: INCLUDE(somefile.txt)
Diffstat (limited to 'Source/cmIncludeCommand.h')
-rw-r--r--Source/cmIncludeCommand.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/Source/cmIncludeCommand.h b/Source/cmIncludeCommand.h
new file mode 100644
index 0000000..38f3680
--- /dev/null
+++ b/Source/cmIncludeCommand.h
@@ -0,0 +1,80 @@
+/*=========================================================================
+
+ 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 cmIncludeCommand_h
+#define cmIncludeCommand_h
+
+#include "cmStandardIncludes.h"
+#include "cmCommand.h"
+
+/** \class cmIncludeCommand
+ * \brief
+ *
+ * cmIncludeCommand defines a list of distant
+ * files that can be "included" in the current list file.
+ * In almost every sense, this is identical to a C/C++
+ * #include command. Arguments are first expended as usual.
+ */
+class cmIncludeCommand : public cmCommand
+{
+public:
+ /**
+ * This is a virtual constructor for the command.
+ */
+ virtual cmCommand* Clone()
+ {
+ return new cmIncludeCommand;
+ }
+
+ /**
+ * 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 "INCLUDE";}
+
+ /**
+ * Succinct documentation.
+ */
+ virtual const char* GetTerseDocumentation()
+ {
+ return "Basically identical to a C #include \"somthing\" command.";
+ }
+
+ /**
+ * More documentation.
+ */
+ virtual const char* GetFullDocumentation()
+ {
+ return
+ "INCLUDE(file1 file2)\n";
+ }
+
+ cmTypeMacro(cmIncludeCommand, cmCommand);
+};
+
+
+
+#endif