Browse Source

cache now loaded into makefile

Ken Martin 24 years ago
parent
commit
13d4fd06f0
2 changed files with 4 additions and 2 deletions
  1. 3 2
      Source/MFCDialog/CMakeSetupDialog.cpp
  2. 1 0
      Source/cmMakefile.cxx

+ 3 - 2
Source/MFCDialog/CMakeSetupDialog.cpp

@@ -341,10 +341,10 @@ void CMakeSetupDialog::OnBuildProjects()
     // current GUI values to the cache
     // current GUI values to the cache
     this->SaveCacheFromGUI();
     this->SaveCacheFromGUI();
     }
     }
-  // Make sure we are working from the cache on disk
-  this->LoadCacheFromDiskToGUI();
   // Create a makefile object
   // Create a makefile object
   cmMakefile makefile;
   cmMakefile makefile;
+  // Make sure we are working from the cache on disk
+  this->LoadCacheFromDiskToGUI();
   makefile.SetMakefileGenerator(new cmMSProjectGenerator);
   makefile.SetMakefileGenerator(new cmMSProjectGenerator);
   makefile.SetHomeDirectory(m_WhereSource);
   makefile.SetHomeDirectory(m_WhereSource);
   makefile.SetStartOutputDirectory(m_WhereBuild);
   makefile.SetStartOutputDirectory(m_WhereBuild);
@@ -361,6 +361,7 @@ void CMakeSetupDialog::OnBuildProjects()
   // update the GUI with any new values in the caused by the
   // update the GUI with any new values in the caused by the
   // generation process
   // generation process
   this->LoadCacheFromDiskToGUI();
   this->LoadCacheFromDiskToGUI();
+  cmCacheManager::GetInstance()->DefineCache(&makefile);
   // save source and build paths to registry
   // save source and build paths to registry
   this->SaveToRegistry();
   this->SaveToRegistry();
   // path is not up-to-date
   // path is not up-to-date

+ 1 - 0
Source/cmMakefile.cxx

@@ -63,6 +63,7 @@ cmMakefile::cmMakefile()
   this->AddSourceGroup("Header Files", "\\.(h|hh|hpp|hxx|hm|inl)$");
   this->AddSourceGroup("Header Files", "\\.(h|hh|hpp|hxx|hm|inl)$");
   this->AddDefaultCommands();
   this->AddDefaultCommands();
   this->AddDefaultDefinitions();
   this->AddDefaultDefinitions();
+  cmCacheManager::GetInstance()->DefineCache(this);
 }
 }
 
 
 void cmMakefile::AddDefaultCommands()
 void cmMakefile::AddDefaultCommands()