summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-09-10 20:51:29 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-09-10 20:51:29 (GMT)
commit9149cdd078a1f1ab03eb0a60d30628aeb2395023 (patch)
tree998ee59b89e278926ec862721c31a0b270c619a3 /Source/cmake.h
parent38e412626b604d7f79cac82153047fc59b55597f (diff)
downloadCMake-9149cdd078a1f1ab03eb0a60d30628aeb2395023.zip
CMake-9149cdd078a1f1ab03eb0a60d30628aeb2395023.tar.gz
CMake-9149cdd078a1f1ab03eb0a60d30628aeb2395023.tar.bz2
moved commands into cmake
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 709778f..da5d329 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -25,6 +25,7 @@ class cmGlobalGenerator;
class cmLocalGenerator;
class cmCacheManager;
class cmMakefile;
+class cmCommand;
class cmake
{
@@ -90,6 +91,12 @@ class cmake
//@}
/**
+ * Dump documentation to a file. If 0 is returned, the
+ * operation failed.
+ */
+ int DumpDocumentationToFile(std::ostream&);
+
+ /**
* Handle a command line invocation of cmake.
*/
int Run(const std::vector<std::string>&args);
@@ -141,6 +148,19 @@ class cmake
static int CMakeCommand(std::vector<std::string>&);
/**
+ * Add a command to this cmake instance
+ */
+ void AddCommand(cmCommand* );
+
+ /**
+ * Get a command by its name
+ */
+ cmCommand *GetCommand(const char *name);
+
+ /** Check if a command exists. */
+ bool CommandExists(const char* name) const;
+
+ /**
* Is cmake in the process of a local cmake invocation. If so, we know the
* cache is already configured and ready to go.
*/
@@ -156,6 +176,10 @@ class cmake
void SetArgs(const std::vector<std::string>&);
protected:
+ typedef std::map<cmStdString, cmCommand*> RegisteredCommandsMap;
+ RegisteredCommandsMap m_Commands;
+ void AddDefaultCommands();
+
cmGlobalGenerator *m_GlobalGenerator;
cmCacheManager *m_CacheManager;
std::string m_cmHomeDirectory;