summaryrefslogtreecommitdiff
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-09-01 08:49:00 -0400
committerDavid Cole <david.cole@kitware.com>2011-09-01 08:49:00 -0400
commit0c28b48d9b46415964ddaabf082dbdc059c770c2 (patch)
tree52ab0eb4add611b184ac5f67c9905a4d3786d190 /Source/cmake.cxx
parent89f420abdefd387ec600e958f4aef15295b9daa4 (diff)
downloadcmake-0c28b48d9b46415964ddaabf082dbdc059c770c2.tar.gz
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/cmake.cxx')
-rw-r--r--Source/cmake.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 2b8c718e02..86fd069919 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;
}