diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2001-10-30 19:36:50 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2001-10-30 19:36:50 (GMT) |
commit | 33b0bca1c4e820d962b68b7679667ba837e28000 (patch) | |
tree | 7258be9d4d70fcbdbda55fc0c0442d7b2a0704bf /Source/cmCacheManager.cxx | |
parent | f59946de67f65518d73679acf8c94aa2f83c04af (diff) | |
download | CMake-33b0bca1c4e820d962b68b7679667ba837e28000.zip CMake-33b0bca1c4e820d962b68b7679667ba837e28000.tar.gz CMake-33b0bca1c4e820d962b68b7679667ba837e28000.tar.bz2 |
Fix the problem on windows of capital or lower case drive letter for CMAKE_CACHEFILE_DIR
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 43dace9..b38a245 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -249,6 +249,11 @@ bool cmCacheManager::LoadCache(const char* path, } std::string currentcwd = path; + if ( currentcwd[0] >= 'A' && currentcwd[0] <= 'Z' && + currentcwd[1] == ':' ) + { + currentcwd[0] = currentcwd[0] - 'A' + 'a'; + } cmSystemTools::ConvertToUnixSlashes(currentcwd); if(internal && this->GetCacheValue("CMAKE_CACHEFILE_DIR") && std::string(this->GetCacheValue("CMAKE_CACHEFILE_DIR")) != currentcwd) @@ -316,6 +321,11 @@ bool cmCacheManager::SaveCache(const char* path) // Let us store the current working directory so that if somebody // Copies it, he will not be surprised std::string currentcwd = path; + if ( currentcwd[0] >= 'A' && currentcwd[0] <= 'Z' && + currentcwd[1] == ':' ) + { + currentcwd[0] = currentcwd[0] - 'A' + 'a'; + } cmSystemTools::ConvertToUnixSlashes(currentcwd); this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(), "This is the directory where this CMakeCahe.txt" |