diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-26 15:18:27 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-28 05:50:01 (GMT) |
commit | 410f39a43ef3ad900bcaed15e6838f97f034f0e7 (patch) | |
tree | 492d6e230ce14301b645980aded53e0e6bf80f19 /Source/cmake.cxx | |
parent | 397b6298602f1496d1b946f5db827f5807d6ed23 (diff) | |
download | CMake-410f39a43ef3ad900bcaed15e6838f97f034f0e7.zip CMake-410f39a43ef3ad900bcaed15e6838f97f034f0e7.tar.gz CMake-410f39a43ef3ad900bcaed15e6838f97f034f0e7.tar.bz2 |
cmMakefile: Delegate storage of Home dirs to the cmake class.
There is no need to duplicate these on every cmMakefile.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 439cc54..f72b088 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -372,13 +372,13 @@ void cmake::ReadListFile(const std::vector<std::string>& args, // read in the list file to fill the cache if(path) { + std::string homeDir = this->GetHomeDirectory(); + std::string homeOutputDir = this->GetHomeOutputDirectory(); + this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory()); + this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory()); cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator()); - lg->GetMakefile()->SetHomeOutputDirectory - (cmSystemTools::GetCurrentWorkingDirectory()); lg->GetMakefile()->SetCurrentBinaryDirectory (cmSystemTools::GetCurrentWorkingDirectory()); - lg->GetMakefile()->SetHomeDirectory - (cmSystemTools::GetCurrentWorkingDirectory()); lg->GetMakefile()->SetCurrentSourceDirectory (cmSystemTools::GetCurrentWorkingDirectory()); if (this->GetWorkingMode() != NORMAL_MODE) @@ -393,6 +393,8 @@ void cmake::ReadListFile(const std::vector<std::string>& args, { cmSystemTools::Error("Error processing file: ", path); } + this->SetHomeDirectory(homeDir); + this->SetHomeOutputDirectory(homeOutputDir); } // free generic one if generated |