summaryrefslogtreecommitdiffstats
path: root/Source/cmNMakeMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-11-28 12:15:04 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-11-28 12:15:04 (GMT)
commited50410ae7903c8ed4b772e55fb797e651790f32 (patch)
tree32c2c6aec62e181c9eff174cdb9788c725f7607e /Source/cmNMakeMakefileGenerator.cxx
parentf901b9c3403b62b0a5f8e7e07e821b88f9d6e15b (diff)
downloadCMake-ed50410ae7903c8ed4b772e55fb797e651790f32.zip
CMake-ed50410ae7903c8ed4b772e55fb797e651790f32.tar.gz
CMake-ed50410ae7903c8ed4b772e55fb797e651790f32.tar.bz2
bug: fix same path comparison when short paths are used
Diffstat (limited to 'Source/cmNMakeMakefileGenerator.cxx')
-rw-r--r--Source/cmNMakeMakefileGenerator.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx
index 1e5a2f7..ab43d2e 100644
--- a/Source/cmNMakeMakefileGenerator.cxx
+++ b/Source/cmNMakeMakefileGenerator.cxx
@@ -549,7 +549,18 @@ void cmNMakeMakefileGenerator::OutputIncludeMakefile(std::ostream& fout,
fout << "!include " << file << "\n";
}
-
+bool cmNMakeMakefileGenerator::SamePath(const char* path1, const char* path2)
+{
+ // first check to see if they are the same anyway
+ if (strcmp(path1, path2) == 0)
+ {
+ return true;
+ }
+ // next short path and lower case both of them for the compare
+ return
+ cmSystemTools::LowerCase(ShortPath(path1)) ==
+ cmSystemTools::LowerCase(ShortPath(path2));
+}
void cmNMakeMakefileGenerator::OutputBuildLibraryInDir(std::ostream& fout,
const char* path,