mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 16:18:43 -05:00
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.
This commit is contained in:
+4
-2
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user