summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmNMakeMakefileGenerator.cxx6
-rw-r--r--Source/cmNMakeMakefileGenerator.h2
-rw-r--r--Source/cmUnixMakefileGenerator.cxx12
-rw-r--r--Source/cmUnixMakefileGenerator.h7
4 files changed, 18 insertions, 9 deletions
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx
index 14222ad..f34c390 100644
--- a/Source/cmNMakeMakefileGenerator.cxx
+++ b/Source/cmNMakeMakefileGenerator.cxx
@@ -711,3 +711,9 @@ std::string cmNMakeMakefileGenerator::CreateMakeVariable(const char* s, const ch
cmSystemTools::ReplaceString(ret, "-", "_");
return ret;
}
+
+std::string cmNMakeMakefileGenerator::LowerCasePath(const char* path)
+{
+ return cmSystemTools::LowerCase(path);
+}
+
diff --git a/Source/cmNMakeMakefileGenerator.h b/Source/cmNMakeMakefileGenerator.h
index e3d8b03..1a51a96 100644
--- a/Source/cmNMakeMakefileGenerator.h
+++ b/Source/cmNMakeMakefileGenerator.h
@@ -90,7 +90,7 @@ protected:
virtual std::string ConvertToOutputPath(const char* s);
virtual std::string CreateMakeVariable(const char* s, const char* s2);
-
+ virtual std::string LowerCasePath(const char* path);
private:
std::string m_LibraryPathOption;// option to specifiy a link path -LIBPATH
std::string m_LibraryLinkOption; // option to specify a library (like -l, empty for nmake)
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index 0245038..31e5085 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -1356,7 +1356,7 @@ bool cmUnixMakefileGenerator::OutputObjectDepends(std::ostream& fout)
// by the class cmMakeDepend GenerateMakefile
void cmUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
{
- std::set<std::string> emittedShortPath;
+ std::set<std::string> emittedLowerPath;
std::set<std::string> emitted;
// Iterate over every target.
std::map<cmStdString, cmTarget>& targets = m_Makefile->GetTargets();
@@ -1388,13 +1388,9 @@ void cmUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
{
std::string dependfile =
this->ConvertToOutputPath(cmSystemTools::CollapseFullPath(dep->c_str()).c_str());
- // use the short path function to create uniqe names
- std::string shortpath;
- if(!cmSystemTools::GetShortPath(dependfile.c_str(), shortpath))
- {
- shortpath = dependfile;
- }
- if(emittedShortPath.insert(shortpath).second)
+ // use the lower path function to create uniqe names
+ std::string lowerpath = this->LowerCasePath(dependfile.c_str());
+ if(emittedLowerPath.insert(lowerpath).second)
{
emitted.insert(dependfile);
fout << " \\\n" << dependfile ;
diff --git a/Source/cmUnixMakefileGenerator.h b/Source/cmUnixMakefileGenerator.h
index 9881484..c25879c 100644
--- a/Source/cmUnixMakefileGenerator.h
+++ b/Source/cmUnixMakefileGenerator.h
@@ -169,6 +169,13 @@ protected:
return std::string(s) + std::string(s2);
}
+ ///! if the OS is case insensitive then return a lower case of the path.
+ virtual std::string LowerCasePath(const char* path)
+ {
+ return std::string(path);
+ }
+
+
protected:
std::string m_ExecutableOutputPath;
std::string m_LibraryOutputPath;