Viewing preprocessor output?
Answered
Is there a way to see preprocessor output, such as one would get when compiling with -E ?
Please sign in to leave a comment.
Using CLion 2020.2, I'm able to open a TU file and use the "clangd: Preprocess current TU" action to open a tab displaying the contents of the preprocessor output.
Very useful! So much that I now have a shortcut for it.
Hi Jacob. I don't understand where you want to see this output? Anyway, you can manually update CMake options in `File | Settings | Build, Execution, Deployment | CMake` with adding -E to compiler flags.
Hi Maxim,
I'm not too picky about 'where' it shows up, just that I could find it (and I was hoping not to have to add -E manually).
Thanks.
Maybe what Jacob is looking for (and myself) is the equivalent to "preprocessor to a file" option in visual studio which creates an .i file