summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-06-14 16:28:32 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-06-14 16:28:32 (GMT)
commit8e9a6becccc739e8135d5a3b303e8bf125fe3015 (patch)
tree4d7cbd51dd9ce0b7ecb79bcde0b4439c912383e7 /Source/cmCacheManager.cxx
parent108839ffda95fc54296d05dec176ff3a6ed6f02c (diff)
downloadCMake-8e9a6becccc739e8135d5a3b303e8bf125fe3015.zip
CMake-8e9a6becccc739e8135d5a3b303e8bf125fe3015.tar.gz
CMake-8e9a6becccc739e8135d5a3b303e8bf125fe3015.tar.bz2
ENH: centralized locaiton of CMakeFiles setting
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index a0a231f..5eecb1d 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -19,6 +19,7 @@
#include "cmSystemTools.h"
#include "cmCacheManager.h"
#include "cmMakefile.h"
+#include "cmake.h"
#include <cmsys/Directory.hxx>
#include <cmsys/Glob.hxx>
@@ -163,7 +164,8 @@ bool cmCacheManager::ParseEntry(const char* entry,
void cmCacheManager::CleanCMakeFiles(const char* path)
{
std::string glob = path;
- glob += "/CMakeFiles/*.cmake";
+ glob += cmake::GetCMakeFilesDirectory();
+ glob += "/*.cmake";
cmsys::Glob globIt;
globIt.FindFiles(glob);
std::vector<std::string> files = globIt.GetFiles();
@@ -601,7 +603,7 @@ bool cmCacheManager::SaveCache(const char* path)
cacheFile.c_str());
cmSystemTools::RemoveFile(tempFile.c_str());
std::string checkCacheFile = path;
- checkCacheFile += "/CMakeFiles";
+ checkCacheFile += cmake::GetCMakeFilesDirectory();
cmSystemTools::MakeDirectory(checkCacheFile.c_str());
checkCacheFile += "/cmake.check_cache";
std::ofstream checkCache(checkCacheFile.c_str());
@@ -626,7 +628,7 @@ bool cmCacheManager::DeleteCache(const char* path)
// now remove the files in the CMakeFiles directory
// this cleans up language cache files
cmsys::Directory dir;
- cmakeFiles += "/CMakeFiles";
+ cmakeFiles += cmake::GetCMakeFilesDirectory();
dir.Load(cmakeFiles.c_str());
for (unsigned long fileNum = 0;
fileNum < dir.GetNumberOfFiles();