diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-30 23:57:04 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-07 18:19:41 (GMT) |
commit | 360e4e1db0cc89ea4f092eeb1ba1e6df8ee782b7 (patch) | |
tree | ddc52c40a5a4124c0441471627a27bdd2c79af00 /Source/cmake.cxx | |
parent | f716460ed82134bd1ca09f49bfa507cb2645d96c (diff) | |
download | CMake-360e4e1db0cc89ea4f092eeb1ba1e6df8ee782b7.zip CMake-360e4e1db0cc89ea4f092eeb1ba1e6df8ee782b7.tar.gz CMake-360e4e1db0cc89ea4f092eeb1ba1e6df8ee782b7.tar.bz2 |
Set the current dirs on the snapshot before creating the cmMakefile.
The cmMakefile should get a fully prepared snapshot and not clobber its
definitions. It should eventually be able to process list files from any
starting-point snapshot, though that is some refactoring away still.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 2aa092a..fececfd 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -377,11 +377,11 @@ void cmake::ReadListFile(const std::vector<std::string>& args, this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory()); this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory()); cmState::Snapshot snapshot = this->GetCurrentSnapshot(); - cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot)); - mf->SetCurrentBinaryDirectory + snapshot.GetDirectory().SetCurrentBinary (cmSystemTools::GetCurrentWorkingDirectory()); - mf->SetCurrentSourceDirectory + snapshot.GetDirectory().SetCurrentSource (cmSystemTools::GetCurrentWorkingDirectory()); + cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot)); if (this->GetWorkingMode() != NORMAL_MODE) { std::string file(cmSystemTools::CollapseFullPath(path)); @@ -418,13 +418,13 @@ bool cmake::FindPackage(const std::vector<std::string>& args) this->SetGlobalGenerator(gg); cmState::Snapshot snapshot = this->GetCurrentSnapshot(); + snapshot.GetDirectory().SetCurrentBinary + (cmSystemTools::GetCurrentWorkingDirectory()); + snapshot.GetDirectory().SetCurrentSource + (cmSystemTools::GetCurrentWorkingDirectory()); // read in the list file to fill the cache cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot)); cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(mf.get())); - mf->SetCurrentBinaryDirectory - (cmSystemTools::GetCurrentWorkingDirectory()); - mf->SetCurrentSourceDirectory - (cmSystemTools::GetCurrentWorkingDirectory()); mf->SetArgcArgv(args); |