summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-11-21 22:45:01 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-11-21 22:45:01 (GMT)
commit12551a33c394cd06a082f2df2ad550e38d762a98 (patch)
tree7d1358ac4841807d28ea9e2d7f18b65390df7acf /Source/cmCacheManager.cxx
parent66135bee42c1743eab8f4f64d87585a9824d6d37 (diff)
downloadCMake-12551a33c394cd06a082f2df2ad550e38d762a98.zip
CMake-12551a33c394cd06a082f2df2ad550e38d762a98.tar.gz
CMake-12551a33c394cd06a082f2df2ad550e38d762a98.tar.bz2
NMake with spaces in directories
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx40
1 files changed, 11 insertions, 29 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 9ba01db..f784301 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -248,39 +248,21 @@ bool cmCacheManager::LoadCache(const char* path,
{
std::string currentcwd = path;
std::string oldcwd = this->GetCacheValue("CMAKE_CACHEFILE_DIR");
-#if defined(_WIN32) || defined(__CYGWIN__)
- currentcwd = cmSystemTools::LowerCase(currentcwd);
- oldcwd = cmSystemTools::LowerCase(oldcwd);
-#endif // _WIN32
cmSystemTools::ConvertToUnixSlashes(currentcwd);
- if(cmSystemTools::CollapseFullPath(oldcwd.c_str())
- != cmSystemTools::CollapseFullPath(currentcwd.c_str()))
+ currentcwd += "/CMakeCache.txt";
+ oldcwd += "/CMakeCache.txt";
+ if(!cmSystemTools::SameFile(oldcwd.c_str(), currentcwd.c_str()))
{
-#if defined(_WIN32) || defined(__CYGWIN__)
- char filename1[1024];
- char filename2[1024];
- GetShortPathName(cmSystemTools::CollapseFullPath(oldcwd.c_str()).c_str(),
- filename1, 1023);
- GetShortPathName(cmSystemTools::CollapseFullPath(currentcwd.c_str()).c_str(),
- filename2, 1023);
- if ( std::string(filename1) != std::string(filename2) )
- {
-#endif // _WIN32
- 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());
-#if defined(_WIN32) || defined(__CYGWIN__)
- }
-#endif // _WIN32
+ 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;
}