diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-04-19 12:27:50 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-04-19 12:27:50 (GMT) |
commit | 75f9434374ec2ed5e0f516ff914e9c2b4c519e33 (patch) | |
tree | 44e0f7b93c01403e92717365921fc350aa6776ee /Source/cmake.cxx | |
parent | dd7ab1f577b05a15fadc96d4705a4006e42fb51c (diff) | |
download | CMake-75f9434374ec2ed5e0f516ff914e9c2b4c519e33.zip CMake-75f9434374ec2ed5e0f516ff914e9c2b4c519e33.tar.gz CMake-75f9434374ec2ed5e0f516ff914e9c2b4c519e33.tar.bz2 |
BUG: fix SameFile function for windows, and compare source directories
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index cb6cfc1..097b1be 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -358,19 +358,15 @@ int cmake::Generate(const std::vector<std::string>& args, bool buildMakefiles) cmCacheManager::GetInstance()->LoadCache(&mf); if(mf.GetDefinition("CMAKE_HOME_DIRECTORY")) { - std::string cacheStart = - cmSystemTools::CollapseFullPath(mf.GetDefinition("CMAKE_HOME_DIRECTORY")); - std::string currentStart = - cmSystemTools::CollapseFullPath(mf.GetHomeDirectory()); -#ifdef _WIN32 - cacheStart = cmSystemTools::LowerCase(cacheStart); - currentStart = cmSystemTools::LowerCase(currentStart); -#endif - if(cacheStart != currentStart) + std::string cacheStart = mf.GetDefinition("CMAKE_HOME_DIRECTORY"); + cacheStart += "/CMakeLists.txt"; + std::string currentStart = mf.GetHomeDirectory(); + currentStart += "/CMakeLists.txt"; + if(!cmSystemTools::SameFile(cacheStart.c_str(), currentStart.c_str())) { - std::string message = "Error: source directory: "; + std::string message = "Error: source : "; message += currentStart; - message += "\nDoes not match source directory used to generate cache: "; + message += "\nDoes not match source used to generate cache: "; message += cacheStart; message += "\nRe-run cmake with a different source directory."; cmSystemTools::Error(message.c_str()); |