summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-17 15:32:01 (GMT)
committerBrad King <brad.king@kitware.com>2010-12-17 15:32:01 (GMT)
commitad25a968b9e47e9e966d166dd0e494dc684ebd66 (patch)
tree5638f53977907708fd7473f5b3c9a582a36a1a92 /Source/cmake.h
parentc128abe383e2f08e3f3e916f9b64356ca47056d1 (diff)
parent78c86f454272a2ac417ad6a89e4c7ed7e4975adb (diff)
downloadCMake-ad25a968b9e47e9e966d166dd0e494dc684ebd66.zip
CMake-ad25a968b9e47e9e966d166dd0e494dc684ebd66.tar.gz
CMake-ad25a968b9e47e9e966d166dd0e494dc684ebd66.tar.bz2
Merge branch 'ImprovedDotSupport2' into dev/strict-mode
Conflicts: Source/cmake.cxx
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h76
1 files changed, 39 insertions, 37 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index b132164..4d348bb 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -21,14 +21,14 @@
// command line arguments.
// 3) Load the cache by calling LoadCache (duh)
// 4) if you are using command line arguments with -D or -C flags then
-// call SetCacheArgs (or if for some other reason you want to modify the
+// call SetCacheArgs (or if for some other reason you want to modify the
// cache, do it now.
// 5) Finally call Configure
// 6) Let the user change values and go back to step 5
// 7) call Generate
//
// If your GUI allows the user to change the start & home directories then
-// you must at a minimum redo steps 2 through 7.
+// you must at a minimum redo steps 2 through 7.
//
@@ -50,6 +50,8 @@ class cmExternalMakefileProjectGenerator;
class cmDocumentationSection;
class cmPolicies;
class cmListFileBacktrace;
+class cmTarget;
+class cmGeneratedFileStream;
class cmake
{
@@ -73,14 +75,14 @@ class cmake
static const char *GetCMakeFilesDirectory() {return "/CMakeFiles";};
static const char *GetCMakeFilesDirectoryPostSlash() {
return "CMakeFiles/";};
-
+
//@{
/**
* Set/Get the home directory (or output directory) in the project. The
* home directory is the top directory of the project. It is where
* cmake was run. Remember that CMake processes
* CMakeLists files by recursing up the tree starting at the StartDirectory
- * and going up until it reaches the HomeDirectory.
+ * and going up until it reaches the HomeDirectory.
*/
void SetHomeDirectory(const char* dir);
const char* GetHomeDirectory() const
@@ -100,9 +102,9 @@ class cmake
* is the directory of the CMakeLists.txt file that started the current
* round of processing. Remember that CMake processes CMakeLists files by
* recursing up the tree starting at the StartDirectory and going up until
- * it reaches the HomeDirectory.
+ * it reaches the HomeDirectory.
*/
- void SetStartDirectory(const char* dir)
+ void SetStartDirectory(const char* dir)
{
this->cmStartDirectory = dir;
cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory);
@@ -158,7 +160,7 @@ class cmake
///! Return the global generator assigned to this instance of cmake
cmGlobalGenerator* GetGlobalGenerator() { return this->GlobalGenerator; }
///! Return the global generator assigned to this instance of cmake, const
- const cmGlobalGenerator* GetGlobalGenerator() const
+ const cmGlobalGenerator* GetGlobalGenerator() const
{ return this->GlobalGenerator; }
///! Return the global generator assigned to this instance of cmake
@@ -169,25 +171,25 @@ class cmake
///! get the cmCachemManager used by this invocation of cmake
cmCacheManager *GetCacheManager() { return this->CacheManager; }
-
+
///! set the cmake command this instance of cmake should use
void SetCMakeCommand(const char* cmd) { this->CMakeCommand = cmd; }
-
+
/**
* Given a variable name, return its value (as a string).
*/
const char* GetCacheDefinition(const char*) const;
///! Add an entry into the cache
- void AddCacheEntry(const char* key, const char* value,
- const char* helpString,
+ void AddCacheEntry(const char* key, const char* value,
+ const char* helpString,
int type);
- /**
+ /**
* Execute commands during the build process. Supports options such
* as echo, remove file etc.
*/
static int ExecuteCMakeCommand(std::vector<std::string>&);
- /**
+ /**
* Get the system information and write it to the file specified
*/
int GetSystemInformation(std::vector<std::string>&);
@@ -210,17 +212,17 @@ class cmake
/** Check if a command exists. */
bool CommandExists(const char* name) const;
-
+
///! Parse command line arguments
void SetArgs(const std::vector<std::string>&,
bool directoriesSetBefore = false);
///! Is this cmake running as a result of a TRY_COMPILE command
bool GetIsInTryCompile() { return this->InTryCompile; }
-
+
///! Is this cmake running as a result of a TRY_COMPILE command
void SetIsInTryCompile(bool i) { this->InTryCompile = i; }
-
+
///! Parse command line arguments that might set cache values
bool SetCacheArgs(const std::vector<std::string>&);
@@ -228,9 +230,9 @@ class cmake
(const char*msg, float progress, void *);
/**
* Set the function used by GUI's to receive progress updates
- * Function gets passed: message as a const char*, a progress
+ * Function gets passed: message as a const char*, a progress
* amount ranging from 0 to 1.0 and client data. The progress
- * number provided may be negative in cases where a message is
+ * number provided may be negative in cases where a message is
* to be displayed without any progress percentage.
*/
void SetProgressCallback(ProgressCallbackType f, void* clientData=0);
@@ -245,14 +247,14 @@ class cmake
cmVariableWatch* GetVariableWatch() { return this->VariableWatch; }
/** Get the documentation entries for the supported commands.
- * If withCurrentCommands is true, the documentation for the
+ * If withCurrentCommands is true, the documentation for the
* recommended set of commands is included.
* If withCompatCommands is true, the documentation for discouraged
* (compatibility) commands is included.
* You probably don't want to set both to false.
*/
- void GetCommandDocumentation(std::vector<cmDocumentationEntry>& entries,
- bool withCurrentCommands = true,
+ void GetCommandDocumentation(std::vector<cmDocumentationEntry>& entries,
+ bool withCurrentCommands = true,
bool withCompatCommands = true) const;
void GetPropertiesDocumentation(std::map<std::string,
cmDocumentationSection *>&);
@@ -279,7 +281,7 @@ class cmake
*/
void SetScriptMode(bool mode) { this->ScriptMode = mode; }
bool GetScriptMode() { return this->ScriptMode; }
-
+
///! Debug the try compile stuff by not delelting the files
bool GetDebugTryCompile(){return this->DebugTryCompile;}
void DebugTryCompileOn(){this->DebugTryCompile = true;}
@@ -322,7 +324,7 @@ class cmake
void DefineProperty(const char *name, cmProperty::ScopeType scope,
const char *ShortDescription,
const char *FullDescription,
- bool chain = false,
+ bool chain = false,
const char *variableGroup = 0);
// get property definition
@@ -350,7 +352,7 @@ class cmake
}
void SetSuppressDevWarnings(bool v)
{
- this->SuppressDevWarnings = v;
+ this->SuppressDevWarnings = v;
this->DoSuppressDevWarnings = true;
}
@@ -372,10 +374,10 @@ protected:
cmPropertyMap Properties;
std::set<std::pair<cmStdString,cmProperty::ScopeType> > AccessedProperties;
- std::map<cmProperty::ScopeType, cmPropertyDefinitionMap>
+ std::map<cmProperty::ScopeType, cmPropertyDefinitionMap>
PropertyDefinitions;
- typedef
+ typedef
cmExternalMakefileProjectGenerator* (*CreateExtraGeneratorFunctionType)();
typedef std::map<cmStdString,
CreateExtraGeneratorFunctionType> RegisteredExtraGeneratorsMap;
@@ -389,15 +391,15 @@ protected:
void AddDefaultCommands();
void AddDefaultGenerators();
void AddDefaultExtraGenerators();
- void AddExtraGenerator(const char* name,
+ void AddExtraGenerator(const char* name,
CreateExtraGeneratorFunctionType newFunction);
- cmPolicies *Policies;
+ cmPolicies *Policies;
cmGlobalGenerator *GlobalGenerator;
cmCacheManager *CacheManager;
- std::string cmHomeDirectory;
+ std::string cmHomeDirectory;
std::string HomeOutputDirectory;
- std::string cmStartDirectory;
+ std::string cmStartDirectory;
std::string StartOutputDirectory;
bool SuppressDevWarnings;
bool DoSuppressDevWarnings;
@@ -408,7 +410,7 @@ protected:
///! Check if CMAKE_CACHEFILE_DIR is set. If it is not, delete the log file.
/// If it is set, truncate it to 50kb
void TruncateOutputLog(const char* fname);
-
+
/**
* Method called to check build system integrity at build time.
* Returns 1 if CMake should rerun and 0 otherwise.
@@ -431,24 +433,24 @@ protected:
static int ExecuteLinkScript(std::vector<std::string>& args);
static int VisualStudioLink(std::vector<std::string>& args, int type);
static int VisualStudioLinkIncremental(std::vector<std::string>& args,
- int type,
+ int type,
bool verbose);
static int VisualStudioLinkNonIncremental(std::vector<std::string>& args,
int type,
bool hasManifest,
bool verbose);
- static int ParseVisualStudioLinkCommand(std::vector<std::string>& args,
- std::vector<cmStdString>& command,
+ static int ParseVisualStudioLinkCommand(std::vector<std::string>& args,
+ std::vector<cmStdString>& command,
std::string& targetName);
static bool RunCommand(const char* comment,
std::vector<cmStdString>& command,
bool verbose,
int* retCodeOut = 0);
cmVariableWatch* VariableWatch;
-
+
///! Find the full path to one of the cmake programs like ctest, cpack, etc.
std::string FindCMakeProgram(const char* name) const;
-private:
+private:
cmake(const cmake&); // Not implemented.
void operator=(const cmake&); // Not implemented.
ProgressCallbackType ProgressCallback;
@@ -478,7 +480,7 @@ private:
cmFileTimeComparison* FileComparison;
std::string GraphVizFile;
std::vector<std::string> DebugConfigs;
-
+
void UpdateConversionPathTable();
};