diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-16 07:24:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-21 13:41:27 (GMT) |
commit | 8dc3a67c9c3c5b49fe7a3b69dab7d60475414c59 (patch) | |
tree | 2ab020aa20fb8dd6a8a33ba5cba661318b36628b /Source/cmMakefile.h | |
parent | 0f3c8cfa96a3b7c426e5a9cc341410fefd2baf75 (diff) | |
download | CMake-8dc3a67c9c3c5b49fe7a3b69dab7d60475414c59.zip CMake-8dc3a67c9c3c5b49fe7a3b69dab7d60475414c59.tar.gz CMake-8dc3a67c9c3c5b49fe7a3b69dab7d60475414c59.tar.bz2 |
cmMakefile: Out-of-line the directory methods.
Diffstat (limited to 'Source/cmMakefile.h')
-rw-r--r-- | Source/cmMakefile.h | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8472825..55b2cbd 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -447,43 +447,10 @@ public: */ void SetArgcArgv(const std::vector<std::string>& args); - //@{ - /** - * Set/Get the start directory (or output directory). The start directory - * 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. - */ - void SetCurrentSourceDirectory(const std::string& dir) - { - this->cmStartDirectory = dir; - cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory); - this->cmStartDirectory = - cmSystemTools::CollapseFullPath(this->cmStartDirectory); - this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", - this->cmStartDirectory.c_str()); - } - void SetCurrentBinaryDirectory(const std::string& dir) - { - this->StartOutputDirectory = dir; - cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); - this->StartOutputDirectory = - cmSystemTools::CollapseFullPath(this->StartOutputDirectory); - cmSystemTools::MakeDirectory(this->StartOutputDirectory.c_str()); - this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", - this->StartOutputDirectory.c_str()); - } - //@} - - const char* GetCurrentSourceDirectory() const - { - return this->cmStartDirectory.c_str(); - } - const char* GetCurrentBinaryDirectory() const - { - return this->StartOutputDirectory.c_str(); - } + void SetCurrentSourceDirectory(const std::string& dir); + const char* GetCurrentSourceDirectory() const; + void SetCurrentBinaryDirectory(const std::string& dir); + const char* GetCurrentBinaryDirectory() const; /* Get the current CMakeLists.txt file that is being processed. This * is just used in order to be able to 'branch' from one file to a second |