mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
CMake: Add SaveCache at the end of successful Generate calls
Without this call, recent refactoring changes in the Visual Studio generators yield no GUIDs saved in the cache. Putting the SaveCache here *once* avoids scattering many calls to it in specific generators.
This commit is contained in:
@@ -2531,6 +2531,13 @@ int cmake::Generate()
|
||||
this->ReportUndefinedPropertyAccesses
|
||||
(this->GetProperty("REPORT_UNDEFINED_PROPERTIES"));
|
||||
}
|
||||
// Save the cache again after a successful Generate so that any internal
|
||||
// variables created during Generate are saved. (Specifically target GUIDs
|
||||
// for the Visual Studio and Xcode generators.)
|
||||
if ( this->GetWorkingMode() == NORMAL_MODE )
|
||||
{
|
||||
this->CacheManager->SaveCache(this->GetHomeOutputDirectory());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user