From 0c28b48d9b46415964ddaabf082dbdc059c770c2 Mon Sep 17 00:00:00 2001 From: David Cole Date: Thu, 1 Sep 2011 08:49:00 -0400 Subject: [PATCH] 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. --- Source/cmake.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 2b8c718e0..86fd06991 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -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; }