summaryrefslogtreecommitdiff
path: root/Source/cmDependsC.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmDependsC.cxx')
-rw-r--r--Source/cmDependsC.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index 43b7b8a60..a252a1ab7 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -193,17 +193,8 @@ bool cmDependsC::WriteDependencies(const std::set<std::string>& sources,
// Construct the name of the file as if it were in the current
// include directory. Avoid using a leading "./".
- tempPathStr = "";
- if((*i) == ".")
- {
- tempPathStr += current.FileName;
- }
- else
- {
- tempPathStr += *i;
- tempPathStr+="/";
- tempPathStr+=current.FileName;
- }
+ tempPathStr =
+ cmSystemTools::CollapseCombinedPath(*i, current.FileName);
// Look for the file in this location.
if(cmSystemTools::FileExists(tempPathStr.c_str(), true))
@@ -458,9 +449,8 @@ void cmDependsC::Scan(std::istream& is, const char* directory,
// This was a double-quoted include with a relative path. We
// must check for the file in the directory containing the
// file we are scanning.
- entry.QuotedLocation = directory;
- entry.QuotedLocation += "/";
- entry.QuotedLocation += entry.FileName;
+ entry.QuotedLocation =
+ cmSystemTools::CollapseCombinedPath(directory, entry.FileName);
}
// Queue the file if it has not yet been encountered and it