On 15/06/21 15:07, Gerd Hoffmann wrote:
Hmm, looks like I actually need both.  Seems there is no easy way to get
the cflags out of a source_set to construct a cpp command line.  Pulling
this out of compile_commands.json with jq works though.
Well, easy until I look at target-specific modules where the
"source file" -> "command" mapping isn't unique any more.  Which makes
this route less attractive ...

I was almost giving up... but it looks like the result of extract_all_objects(recursive: true) can be passed to custom_target(). Then you can match it after compile_commands.json's "output" key.

Paolo

Any idea on getting the cflags in meson.build  Or maybe I can somehow
ask meson to run the cpp pass only for a given source set?


Reply via email to