Advanced CMake Project – RSP File Deleted on linker success

Sysprogs forums Forums VisualGDB Advanced CMake Project – RSP File Deleted on linker success

Tagged: , ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32231
    JFerraris
    Participant

    Hello!

    I am not exactly sure whether this is a bug or a known feature, but the generated rsp file (linker arguments) in a CMake project gets automatically deleted on a successful build. The only way to get it to stay (that I know of) is to cause a linker error purposely which keeps it lying in the build directory, but otherwise it is deleted on successful build.I looked through almost all the preferences and VisualGDB properties that I could to see if there was any settings to turn off the deletion but I could not find anything.

    It would be greatly appreciated if you could either add an option to keep this file, or to even just never remove it because I don’t see any need for it to be removed.

    Appreciate your time! Thank you.

    #32232
    support
    Keymaster

    Hi,

    This is handled directly by CMake, rather than VisualGDB. Feel free to browse through CMake source code to see if there is a way to modify this behavior.

    #32237
    JFerraris
    Participant

    Thank you for pointing me in the right direction! I found this link that explained it all, ninja was the culprit here. To get ninja to not delete the rsp file I used the -d keeprsp switch in the Ninja Options in VisualGDB Properties:

    https://gitlab.kitware.com/cmake/cmake/-/issues/20277

    Thank you for the help!

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.