summaryrefslogtreecommitdiff
path: root/Source/cmDependsC.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-17 15:03:53 -0500
committerBrad King <brad.king@kitware.com>2011-01-17 15:03:53 -0500
commit8dc7501d509738606e1d00d23e00a4d28a17e832 (patch)
treead0757e2a00c9088ec0aacc4b82399ef9d60463f /Source/cmDependsC.cxx
parent28a0403c3491d4a96f5dc827e54442a1d0a0dea7 (diff)
downloadcmake-8dc7501d509738606e1d00d23e00a4d28a17e832.tar.gz
Normalize slashes in scanned #include lines (#10281)
On Windows platforms source files may contain '\' in include directives: #include "a\b.h" Normalize these while scanning to use forward slashes. CMake will convert from forward slashes to the direction preferred by the native build tools when writing the path to 'depend.make' files.
Diffstat (limited to 'Source/cmDependsC.cxx')
-rw-r--r--Source/cmDependsC.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index 942cb3fa77..a76b3af5f8 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -448,6 +448,7 @@ void cmDependsC::Scan(std::istream& is, const char* directory,
// Get the file being included.
UnscannedEntry entry;
entry.FileName = this->IncludeRegexLine.match(2);
+ cmSystemTools::ConvertToUnixSlashes(entry.FileName);
if(this->IncludeRegexLine.match(3) == "\"" &&
!cmSystemTools::FileIsFullPath(entry.FileName.c_str()))
{