CMake linker show response files

Hi,

I have problems on my build, and I want to investigate the linker command.
Sadly CMake automatically uses a temporary response file (<target.rsp>) for linking (at least on Windows VS2019).
The file does not exist after the build.

How can i see whats inside?

Which Generator do you use? VS or Ninja?
In case of Ninja you can call it with -d keepdepfile.

1 Like

CMake linker show response files

CMake doesn’t provide a linker. This title is a bit confusing.

Have you tried building via the command line using --verbose?

If that doesn’t help I’d use @jtxa 's suggestion.

Its always the same with this kind of errors… They are fixed before there is an answer and then i forget to look at the question.

Yes, generator is ninja, and -d keepdepfile looks good. I do not remember the target which had the rsp file so i cannot check.
But now its somewhere in the internet, so I will find it next time :slight_smile:

Btw: where are the ninja -d options documented?

@buildSystemPerson You are right, my bad. But CMake creates the response files or instructs the build tool to create (and delete) them.
verbose just shows the linker line, where it shows the respone file but not its contents.

Call ninja -h or directly ninja -d list for a short summary.
Seems to be missing in their manual.