[CMake] Ninja generator fail for QNX on Windows
Cristian Adam
cristian.adam at gmail.com
Wed Sep 24 07:04:48 EDT 2014
Hendrik Sattler <post at ...> 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.
More information about the CMake
mailing list