summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-06-15 14:10:24 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-06-15 14:10:24 (GMT)
commit9d4f3a06864b3b5fe96073ddc256ef39ab24ddad (patch)
treee55df81497545d678b13be3c5ccdcd34ae62af5a /Source/cmake.h
parentc2f7a3c02730759d6bde6b6b50daa1f23cc5fe24 (diff)
downloadCMake-9d4f3a06864b3b5fe96073ddc256ef39ab24ddad.zip
CMake-9d4f3a06864b3b5fe96073ddc256ef39ab24ddad.tar.gz
CMake-9d4f3a06864b3b5fe96073ddc256ef39ab24ddad.tar.bz2
STYLE: remove duplicate non-const accessors GetLocalGenerator(int) and
GetLocaGenerators(cmLocalGenerators) from cmGlobalGenerator(). Now there is one const accessor which is even faster since it returns a reference (instead of copying a vector) -more const to ensure that this the returned local generators don't actually get modified -removed duplicated code in GetCTestCommand() and GetCPackCommand() -added some const accessors Alex
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 9edbd67..6b1f756 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -155,7 +155,10 @@ class cmake
cmGlobalGenerator* CreateGlobalGenerator(const char* name);
///! Return the global generator assigned to this instance of cmake
- cmGlobalGenerator* GetGlobalGenerator() { return this->GlobalGenerator; };
+ cmGlobalGenerator* GetGlobalGenerator() { return this->GlobalGenerator; }
+ ///! Return the global generator assigned to this instance of cmake, const
+ const cmGlobalGenerator* GetGlobalGenerator() const
+ { return this->GlobalGenerator; }
///! Return the global generator assigned to this instance of cmake
void SetGlobalGenerator(cmGlobalGenerator *);
@@ -284,7 +287,7 @@ class cmake
*/
const char* GetCTestCommand();
const char* GetCPackCommand();
- const char* GetCMakeCommand() { return this->CMakeCommand.c_str(); }
+ const char* GetCMakeCommand() const { return this->CMakeCommand.c_str(); }
// Do we want debug output during the cmake run.
bool GetDebugOutput() { return this->DebugOutput; }
@@ -354,13 +357,15 @@ protected:
//macros.
void CleanupCommandsAndMacros();
- void GenerateGraphViz(const char* fileName);
+ void GenerateGraphViz(const char* fileName) const;
static int ExecuteEchoColor(std::vector<std::string>& args);
static int ExecuteLinkScript(std::vector<std::string>& args);
cmVariableWatch* VariableWatch;
+ ///! Find the full path to one of the cmake programs like ctest, cpack, etc.
+ std::string FindCMakeProgram(const char* name) const;
private:
ProgressCallbackType ProgressCallback;
void* ProgressCallbackClientData;