summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-30 23:57:04 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-07 18:19:41 (GMT)
commit360e4e1db0cc89ea4f092eeb1ba1e6df8ee782b7 (patch)
treeddc52c40a5a4124c0441471627a27bdd2c79af00 /Source/cmcmd.cxx
parentf716460ed82134bd1ca09f49bfa507cb2645d96c (diff)
downloadCMake-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/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index f44c77d..ca46111 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -769,11 +769,13 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
{
cm.SetGlobalGenerator(ggd);
cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
+ snapshot.GetDirectory().SetCurrentBinary
+ (cmSystemTools::GetCurrentWorkingDirectory());
+ snapshot.GetDirectory().SetCurrentSource
+ (cmSystemTools::GetCurrentWorkingDirectory());
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(ggd, snapshot));
cmsys::auto_ptr<cmLocalGenerator> lgd(
ggd->CreateLocalGenerator(mf.get()));
- lgd->GetMakefile()->SetCurrentSourceDirectory(startDir);
- lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir);
// Actually scan dependencies.
return lgd->UpdateDependencies(depInfo.c_str(),