summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-26 15:18:27 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-28 05:50:01 (GMT)
commit410f39a43ef3ad900bcaed15e6838f97f034f0e7 (patch)
tree492d6e230ce14301b645980aded53e0e6bf80f19 /Source/cmake.cxx
parent397b6298602f1496d1b946f5db827f5807d6ed23 (diff)
downloadCMake-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.cxx10
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