MantisBT - CMake
View Issue Details
0015278CMakeCMakepublic2014-12-03 09:072015-11-02 09:15
bogdanm 
 
normalmajoralways
closedunable to reproduce 
Win32WindowsWindows 7
CMake 3.0.2 
 
0015278: Ninja generator breaks when creating archives with GNU 'ar' in Windows
When creating an archive in Windows, the Ninja generator doesn't list all the archive members on the command line; instead, it creates a file with a list of all the archive members and gives that to 'ar' using '@file'. That in itself is a very good idea; unfortunately, backslashes in @file are interpreted as escape sequences, which effectively disregards the Windows path separator '\'. This can be fixed by using '\\' instead of '\' in @file.
CMake, ninja
related to 0015439closed Brad King ninja: no possibility to control type of path delimiter and line break for linker response file 
Issue History
2014-12-03 09:07bogdanmNew Issue
2014-12-03 09:07bogdanmTag Attached: CMake
2014-12-03 09:07bogdanmTag Attached: ninja
2014-12-03 09:42Brad KingStatusnew => acknowledged
2014-12-03 09:42Brad KingTarget Version => CMake 3.2
2015-02-04 15:36Brad KingTarget VersionCMake 3.2 => CMake 3.3
2015-03-11 08:27Brad KingRelationship addedrelated to 0015439
2015-04-07 15:49Brad KingNote Added: 0038469
2015-04-07 15:49Brad KingStatusacknowledged => resolved
2015-04-07 15:49Brad KingResolutionopen => unable to reproduce
2015-04-07 15:49Brad KingTarget VersionCMake 3.3 =>
2015-04-07 15:54Brad KingNote Added: 0038470
2015-04-07 16:02Brad KingNote Added: 0038472
2015-05-07 04:01Thomas HerzNote Added: 0038725
2015-05-08 09:39Brad KingNote Added: 0038735
2015-11-02 09:15Robert MaynardNote Added: 0039805
2015-11-02 09:15Robert MaynardStatusresolved => closed

Notes
(0038469)
Brad King   
2015-04-07 15:49   
I cannot reproduce this with CMake 3.2. I tested with a simple test project that has 1000 source files whose objects should be placed in the archive. This is enough to cause the _RSP_FILE rule to be used. The build.ninja file gets a "build ...: ..." line for the static library with forward slashes on the explicit dependencies. This causes ninja to write the RSP_FILE with forward slashes.
(0038470)
Brad King   
2015-04-07 15:54   
I've resolved this as "unable to reproduce" for now.

Please provide more detail about how you encountered this.
(0038472)
Brad King   
2015-04-07 16:02   
See also 0015439:0038471.
(0038725)
Thomas Herz   
2015-05-07 04:01   
@Brad:
I guess, you cannot reproduce this because you used MinGW toolchain. For MinGW the workaround for the correct slashes is already here. With my GCC-based cross-toolchain, I can reproduce it with CMake 3.2.2.
(0038735)
Brad King   
2015-05-08 09:39   
See related changes linked in 0015439:0038728.
(0039805)
Robert Maynard   
2015-11-02 09:15   
Closing resolved issues that have not been updated in more than 4 months.