summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 9a07aef..67c776e 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -1080,13 +1080,13 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args)
cm.SetHomeDirectory(homeDir);
cm.SetHomeOutputDirectory(homeOutDir);
cm.GetCurrentSnapshot().SetDefaultDefinitions();
- if (cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen)) {
- cm.SetGlobalGenerator(ggd);
+ if (auto ggd = cm.CreateGlobalGenerator(gen)) {
+ cm.SetGlobalGenerator(std::move(ggd));
cmStateSnapshot snapshot = cm.GetCurrentSnapshot();
snapshot.GetDirectory().SetCurrentBinary(startOutDir);
snapshot.GetDirectory().SetCurrentSource(startDir);
- cmMakefile mf(ggd, snapshot);
- auto lgd = ggd->CreateLocalGenerator(&mf);
+ cmMakefile mf(cm.GetGlobalGenerator(), snapshot);
+ auto lgd = cm.GetGlobalGenerator()->CreateLocalGenerator(&mf);
// Actually scan dependencies.
return lgd->UpdateDependencies(depInfo, verbose, color) ? 0 : 2;