diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-12 18:10:40 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-12 21:10:44 (GMT) |
commit | 6241253a4b20e74625b855b1e0d5220c8e7282b1 (patch) | |
tree | e609a731a1fb033122555df6fd33c60624e4ffb5 | |
parent | 0ee3ccb3b0a25264e8302a150eee297dd40affde (diff) | |
download | CMake-6241253a4b20e74625b855b1e0d5220c8e7282b1.zip CMake-6241253a4b20e74625b855b1e0d5220c8e7282b1.tar.gz CMake-6241253a4b20e74625b855b1e0d5220c8e7282b1.tar.bz2 |
cmake: Out-of-line Home and Start directory methods.
-rw-r--r-- | Source/cmake.cxx | 32 | ||||
-rw-r--r-- | Source/cmake.h | 32 |
2 files changed, 38 insertions, 26 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f182ad2..ec05a0e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1112,12 +1112,44 @@ void cmake::SetHomeDirectory(const std::string& dir) cmSystemTools::ConvertToUnixSlashes(this->cmHomeDirectory); } +const char* cmake::GetHomeDirectory() const +{ + return this->cmHomeDirectory.c_str(); +} + void cmake::SetHomeOutputDirectory(const std::string& dir) { this->HomeOutputDirectory = dir; cmSystemTools::ConvertToUnixSlashes(this->HomeOutputDirectory); } +const char* cmake::GetHomeOutputDirectory() const +{ + return this->HomeOutputDirectory.c_str(); +} + +const char* cmake::GetStartDirectory() const +{ + return this->cmStartDirectory.c_str(); +} + +void cmake::SetStartDirectory(const std::string& dir) +{ + this->cmStartDirectory = dir; + cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory); +} + +const char* cmake::GetStartOutputDirectory() const +{ + return this->StartOutputDirectory.c_str(); +} + +void cmake::SetStartOutputDirectory(const std::string& dir) +{ + this->StartOutputDirectory = dir; + cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); +} + void cmake::SetGlobalGenerator(cmGlobalGenerator *gg) { if(!gg) diff --git a/Source/cmake.h b/Source/cmake.h index 26ee8fe..87b771d 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -113,15 +113,9 @@ class cmake * and going up until it reaches the HomeDirectory. */ void SetHomeDirectory(const std::string& dir); - const char* GetHomeDirectory() const - { - return this->cmHomeDirectory.c_str(); - } + const char* GetHomeDirectory() const; void SetHomeOutputDirectory(const std::string& dir); - const char* GetHomeOutputDirectory() const - { - return this->HomeOutputDirectory.c_str(); - } + const char* GetHomeOutputDirectory() const; //@} //@{ @@ -132,24 +126,10 @@ class cmake * recursing up the tree starting at the StartDirectory and going up until * it reaches the HomeDirectory. */ - void SetStartDirectory(const std::string& dir) - { - this->cmStartDirectory = dir; - cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory); - } - const char* GetStartDirectory() const - { - return this->cmStartDirectory.c_str(); - } - void SetStartOutputDirectory(const std::string& dir) - { - this->StartOutputDirectory = dir; - cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); - } - const char* GetStartOutputDirectory() const - { - return this->StartOutputDirectory.c_str(); - } + void SetStartDirectory(const std::string& dir); + const char* GetStartDirectory() const; + void SetStartOutputDirectory(const std::string& dir); + const char* GetStartOutputDirectory() const; //@} /** |