summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-16 19:09:16 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-20 22:12:51 (GMT)
commit8878bea7b6a157948bb7c806523b1cfa4c9f7af8 (patch)
treebebf787998ce591e4d16b100ebc95d05bf9ed205
parent044dc81504e0d34d7c84a20d333b2177a2c86b54 (diff)
downloadCMake-8878bea7b6a157948bb7c806523b1cfa4c9f7af8.zip
CMake-8878bea7b6a157948bb7c806523b1cfa4c9f7af8.tar.gz
CMake-8878bea7b6a157948bb7c806523b1cfa4c9f7af8.tar.bz2
cmake: Initialize Home directories on cmake for find-package mode.
The Home directories can be used to initialize cmMakefile directories internally.
-rw-r--r--Source/cmake.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index bf05b18..f0fc4f0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -405,6 +405,11 @@ void cmake::ReadListFile(const std::vector<std::string>& args,
bool cmake::FindPackage(const std::vector<std::string>& args)
{
+ this->SetHomeDirectory
+ (cmSystemTools::GetCurrentWorkingDirectory());
+ this->SetHomeOutputDirectory
+ (cmSystemTools::GetCurrentWorkingDirectory());
+
// if a generator was not yet created, temporarily create one
cmGlobalGenerator *gg = new cmGlobalGenerator;
gg->SetCMakeInstance(this);
@@ -413,12 +418,8 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
// read in the list file to fill the cache
cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator());
cmMakefile* mf = lg->GetMakefile();
- mf->SetHomeOutputDirectory
- (cmSystemTools::GetCurrentWorkingDirectory());
mf->SetStartOutputDirectory
(cmSystemTools::GetCurrentWorkingDirectory());
- mf->SetHomeDirectory
- (cmSystemTools::GetCurrentWorkingDirectory());
mf->SetStartDirectory
(cmSystemTools::GetCurrentWorkingDirectory());