summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-09-01 12:49:00 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-09-01 12:49:00 (GMT)
commit0c28b48d9b46415964ddaabf082dbdc059c770c2 (patch)
tree52ab0eb4add611b184ac5f67c9905a4d3786d190 /Source
parent89f420abdefd387ec600e958f4aef15295b9daa4 (diff)
downloadCMake-0c28b48d9b46415964ddaabf082dbdc059c770c2.zip
CMake-0c28b48d9b46415964ddaabf082dbdc059c770c2.tar.gz
CMake-0c28b48d9b46415964ddaabf082dbdc059c770c2.tar.bz2
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmake.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 2b8c718..86fd069 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;
}