From 317dbdb79761ef65e45c7358cfc7571c6afa54ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20THIERRY?= Date: Tue, 23 Dec 2014 09:30:24 +0100 Subject: Imported Upstream version 2.8.12.2 --- Source/cmDependsC.cxx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'Source/cmDependsC.cxx') 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& 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 -- cgit v1.2.3