Just in case anyone is interested - I found a hint in this old thread:
https://cmake.org/pipermail/cmake/2014-February/056993.html
Trick is to use a generator expression like this:
"$<TARGET_PROPERTY:${target_name},COMPILE_DEFINITIONS>"
Regards,
Robert Schwarzel
this information at cmake
configure time. I expected to find this in the property COMPILE_DEFINITIONS
of either the source file foo.c or target foo, but both are empty.
Does anyone know, how to get a list of definitions (that will be used at
build time) for targets or files?
Regards,
Robert Schwarzelt