Recover compiler warnings of up to date targets

Hi All,

Is there a way to recover compiler warnings from target that were up to date and thus not run in the current build run.

The goal is to be able to show diagnostics for the whole project in Eclipse even tough only a small number of targets was run.

In our previous make based builds we worked around this by writing the output of every compile to a file and load all these files for the up to date targets. This way the IDE always showed all diagnostic information.

I didn’t find a way to achieve the same in CMake?

My idea to implement this would be to add an option to CMake that allows it to save the output of every step to a file. And than have a script that searches for all these files and prints them again for the IDE to consume.

If I have a target hat compiles myobj.o the corresponding compiler outpu would be saved to myobj.o.compiler_output.
Then I could just run a simple script like: find -name "*.compiler_output" -exec cat {} \; to recover all compiler warnings.

Is there interest in having such an option? Or is there a better solution I’m missing?

This question seems really relevant to you :slight_smile: .

1 Like