Dumping compiler definitions

Allegedly, giving the gcc compiler the options “-E -dM” will make it dump out all the #define definitions it knows. I tried putting this into a target_compile_options but it did not seem to have any effect. This is cross-compiling for an ARM microprocessor if that makes any difference, but I expect the preprocessor to be the same.

target_compile_options( FreeRTOS PRIVATE
  # Dump symbols
  -E -dM
)

This did work earlier for the “-save-temps” option.

When using -E, the -o flag is used for the output of the preprocessor output, so the “object file” is your expected output (and the rest of the build is going to choke on them not being actual objects).