Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4,110
    • Issues 4,110
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #16425
Closed
Open
Issue created Nov 14, 2016 by Robert Acksel@robert.acksel

CMake generates bad command with ninja using rsp files

CMake (3.6.1 and 3.7.0) have generated a rules file which contains a error in one of our linker rules using Ninja (v 1.7.2).

The following generated command (from rules.ninja) is the BAD example (fails):

rule CXX_STATIC_LIBRARY_LINKER__MyLib
  command = cmd.exe /C "$PRE_LINK && C:\ARM\ARMCT_5.0x\bin\armar.exe --create -cr $TARGET_FILE $LINK_FLAGS @$RSP_FILE && $POST_BUILD"
  description = Linking CXX static library $TARGET_FILE
  rspfile = $RSP_FILE
  rspfile_content = $in_newline $LINK_PATH $LINK_LIBRARIES
  restat = $RESTAT

The following generated but modifyed command (from rules.ninja) is the GOOD example (works):

rule CXX_STATIC_LIBRARY_LINKER__MyLib
  command = cmd.exe /C "$PRE_LINK && C:\ARM\ARMCT_5.0x\bin\armar.exe --create -cr $TARGET_FILE $LINK_FLAGS $RSP_FILE && $POST_BUILD"
  description = Linking CXX static library $TARGET_FILE
  rspfile = $RSP_FILE
  rspfile_content = $in_newline $LINK_PATH $LINK_LIBRARIES
  restat = $RESTAT

You can see that the bad example contains an '@' in the 'command' where the RSP_FILE is specifyed. This will fail the armar.exe because it can not resolve the bad path. Removing the '@' will solve the problem.

This Bug is a Blocker.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking