summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2001-10-30 19:15:15 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2001-10-30 19:15:15 (GMT)
commitf59946de67f65518d73679acf8c94aa2f83c04af (patch)
tree94ca344382f12e137fff359c65d7b098f59f577c /Source
parent091e95f26dba82131de135dce5b14a937b68d92c (diff)
downloadCMake-f59946de67f65518d73679acf8c94aa2f83c04af.zip
CMake-f59946de67f65518d73679acf8c94aa2f83c04af.tar.gz
CMake-f59946de67f65518d73679acf8c94aa2f83c04af.tar.bz2
Change CMAKE_CURRENT_CWD to CMAKE_CACHEFILE_DIR and change the messages
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCacheManager.cxx24
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index c0919fb..43dace9 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -250,15 +250,17 @@ bool cmCacheManager::LoadCache(const char* path,
}
std::string currentcwd = path;
cmSystemTools::ConvertToUnixSlashes(currentcwd);
- if(internal && this->GetCacheValue("CMAKE_CACHE_CWD") &&
- std::string(this->GetCacheValue("CMAKE_CACHE_CWD")) != currentcwd)
+ if(internal && this->GetCacheValue("CMAKE_CACHEFILE_DIR") &&
+ std::string(this->GetCacheValue("CMAKE_CACHEFILE_DIR")) != currentcwd)
{
- cmSystemTools::Error("The current directory is different"
- " than the one CMake was run before."
- " The binary files will be created "
- "in the previous directory. If that "
- "is not what you want, reedit the "
- "CMakeCache.txt");
+ std::string message =
+ std::string("The current CMakeCache.txt directory ") +
+ currentcwd + std::string(" is different than the directory ") +
+ std::string(this->GetCacheValue("CMAKE_CACHEFILE_DIR")) +
+ std::string(" where CMackeCache.txt was created. This may result "
+ "in binaries being created in the wrong place. If you "
+ "are not sure, reedit the CMakeCache.txt");
+ cmSystemTools::Error(message.c_str());
}
return true;
@@ -315,9 +317,9 @@ bool cmCacheManager::SaveCache(const char* path)
// Copies it, he will not be surprised
std::string currentcwd = path;
cmSystemTools::ConvertToUnixSlashes(currentcwd);
- this->AddCacheEntry("CMAKE_CACHE_CWD", currentcwd.c_str(),
- "This is the directory where cmake was running the"
- " last time", cmCacheManager::INTERNAL);
+ this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(),
+ "This is the directory where this CMakeCahe.txt"
+ " was created", cmCacheManager::INTERNAL);
fout << "# This is the CMakeCache file.\n"
<< "# For build in directory: " << path << "\n"