MantisBT - CMake
View Issue Details
0014860CMakeCMakepublic2014-04-02 10:052016-06-10 14:31
kurt.dupont 
Kitware Robot 
normalminorhave not tried
closedmoved 
windowswindows7
CMake 2.8.12.1 
 
0014860: cmake and ninja on windows generate a command with an rsp file that's not understood by the link command
Following lines are generated in rules.ninja
#############################################
# Rule for linking ASM static library.

rule ASM_STATIC_LIBRARY_LINKER
  command = cmd.exe /c $PRE_LINK && armar -r $out $LINK_FLAGS $in && $POST_BUILD
  description = Linking ASM static library $out


#############################################
# Rule for linking ASM static library.

rule ASM_STATIC_LIBRARY_LINKER_RSP_FILE
  command = cmd.exe /c $PRE_LINK && armar -r $out $LINK_FLAGS @$RSP_FILE && $POST_BUILD
  description = Linking ASM static library $out
  rspfile = $RSP_FILE
  rspfile_content = $in_newline $LINK_PATH $LINK_LIBRARIES

The armar command takes --via=${RSP_FILE} as a redirection mechanism

The armar command is defined in my toolchain file as :

set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> -r <TARGET> <LINK_FLAGS> <OBJECTS>")

I found no documentation on the <OBJECTS> token on when this is defined, how this can be used. Is there any way that i can detect/force the use of an rsp file AND influence the string used (@) to indicate the redirection to a file (--via=)?

The actual command issued
 cmd.exe /c cd . && armar -r third-party\threadx\src\threadx_ptp_arm_cortexr4.lib @CMakeFiles/threadx_ptp.rsp && cd .
Error: L6833E: File '@CMakeFiles/threadx_ptp.rsp' does not exist
No tags attached.
Issue History
2014-04-02 10:05kurt.dupontNew Issue
2014-04-02 13:13Ben BoeckelNote Added: 0035624
2014-04-03 08:14kurt.dupontNote Added: 0035631
2016-06-10 14:29Kitware RobotNote Added: 0042526
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
(0035624)
Ben Boeckel   
2014-04-02 13:13   
Ninja uses the <LANG>_RESPONSE_FILE_LINK_FLAG variable to use before the $RSP_FILE parameter (and defaults to "@" if none is found).
(0035631)
kurt.dupont   
2014-04-03 08:14   
Setting the CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG variable works! Thanks
(0042526)
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.