diff options
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 81762a1..8609db3 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -456,8 +456,18 @@ bool cmCacheManager::SaveCache(const char* path) cmSystemTools::CopyFileIfDifferent(tempFile.c_str(), cacheFile.c_str()); cmSystemTools::RemoveFile(tempFile.c_str()); - return true; + std::string checkCacheFile = path; + checkCacheFile += "/cmake.check_cache"; + std::ofstream checkCache(checkCacheFile.c_str()); + if(!checkCache) + { + cmSystemTools::Error("Unable to open check cache file for write. ", + checkCacheFile.c_str()); + return false; } + checkCache << "# This file is generated by cmake for dependency checking of the CMakeCache.txt file\n"; + return true; +} void cmCacheManager::OutputHelpString(std::ofstream& fout, const std::string& helpString) |