Hendrik Sattler <post@...> writes:

> On 23. September 2014 16:22:40 MESZ, Cristian Adam 
> >>> QCC compiler generates for this project dependency files which look
> >like:
> >>>
> >>> c:\projects\my_proj\include\/a.h \
> >>> c:\projects\my_proj\src\/a.cpp \
> >>> c:\projects\my_proj\other\..\/include/b.h \
> >>> c:\projects\my_proj\other\..\/src/b.cpp \
> 
> To me it looks more like a bug in qcc.
> Does qcc generates the same broken files when not used in context of 
> CMake or ninja?
>
> It should only use one kind of separator for directories.
> 
> HS
> 

It might be a bug in qcc.

I've tried to compile CMake with ninja and here are a few dependency files: 

[c:\Projects\cmake-2.8.12.2-build\Source\kwsys\CMakeFiles\cmsys.dir\
Base64.c.o.d]

Source\kwsys\CMakeFiles\cmsys.dir\Base64.c.o: \
 C:\Projects\cmake-2.8.12.2\Source\kwsys\Base64.c \
 C:\Projects\cmake-2.8.12.2\Source\kwsys\/kwsysPrivate.h \
 Source/cmsys/Base64.h Source/cmsys/Configure.h

[c:\Projects\cmake-2.8.12.2-build\Utilities\KWIML\test\CMakeFiles\
cmIML_test.dir\test_ABI_C.c.o.d]

Utilities\KWIML\test\CMakeFiles\cmIML_test.dir\test_ABI_C.c.o: \
 C:\Projects\cmake-2.8.12.2\Utilities\KWIML\test\test_ABI_C.c \
 C:\Projects\cmake-2.8.12.2\Utilities\KWIML\test\/test.h \
 Utilities/cmIML/ABI.h Utilities\KWIML\test/test_ABI_endian.h


The following patch to ninja fixed my problem with the "\/" pair:

diff -Naur ninja-master-orig/src/depfile_parser.in.cc
ninja-master/src/depfile_parser.in.cc
--- ninja-master-orig/src/depfile_parser.in.cc  2014-09-17
22:00:32.000000000 +0200
+++ ninja-master/src/depfile_parser.in.cc       2014-09-24
08:29:03.869714200 +0200
@@ -67,6 +67,11 @@
         *out++ = '$';
         continue;
       }
+      '\\/' {
+        // QCC case on Windows where in some cases "\/" were generated.
+        *out++ = '\\';
+        continue;
+      }
       '\\' [^\000\r\n] {
         // Let backslash before other characters through verbatim.
         *out++ = '\\';

Everything is fine now! ^_^

Cheers,
Cristian.

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to