Hi,
apparently, the COMPILE_DEFINITIONS directory property is not (always) propagated to the targets defined in that directory. Is that on purpose? Do I miss something?
In my situation, there is an add_definitions(-Dsomething) in the toplevel CMakeLists.txt. This is correctly propagated to the COMPILE_DEFINITIONS property of subdirectories: get_directory_property(_defines COMPILE_DEFINITIONS) in a subdirectory yields the expected definition.
However, when asking for get_target_property(_defines ${target} COMPILE_DEFINITIONS) with a ${target} defined in that subdirectory, there is nothing.
Is this again something which can only be addressed via generator expressions?
Kind regards
Ingolf