MantisBT - CMake
View Issue Details
0014917CMakeCMakepublic2014-05-15 12:022016-06-10 14:31
Andreas Boerner 
Kitware Robot 
normalmajoralways
closedmoved 
PC Linuxall
CMake 2.8.12.2 
 
0014917: CMake does nor create response file for Ninja
On a larger project, (cmake -G Ninja) the arguments get too long for Ninja or Linux to handle.
(That's usually the link command).
Linking aborts because of error command line too long
happens always if link command is long enough
I have a work-around for this:

ninjaFix.lex:

%%
CXX_EXECUTABLE_LINKER printf("%s_RSP_FILE", yytext);
TARGET_PDB.+ printf("%s/n RSP_FILE = rsp.txt\n", yytext);
 

flex ninjaFix.lex
gcc -o fix lex.yy.c -lfl

and then I do after cmake -G Ninja:

mv build.ninja build.ninja.in
fix < build.ninja.in > build.ninja

and then I can call ninja -j 20 without an error.


Would be great if this fix could be integrated into the Ninja generator of cmake !



No tags attached.
Issue History
2014-05-15 12:02Andreas BoernerNew Issue
2014-05-15 15:36Ben BoeckelNote Added: 0035886
2014-05-16 00:04Andreas BoernerNote Added: 0035887
2014-05-16 11:47Ben BoeckelNote Added: 0035891
2016-06-10 14:29Kitware RobotNote Added: 0042547
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035886)
Ben Boeckel   
2014-05-15 15:36   
There was a recent patch which fixed some command line length limits. As a workaround, there is the CMAKE_NINJA_FORCE_RESPONSE_FILE which will force response files for all targets.
(0035887)
Andreas Boerner   
2014-05-16 00:04   
Ok, great! What version of cmake do I need to require for that option to work?
(0035891)
Ben Boeckel   
2014-05-16 11:47   
2.8.10 has the variable.
(0042547)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.