No way to access DEFINITIONS with CMP0059 set to NEW
The behavior of the DEFINITIONS and COMPILE_DEFINITIONS directory property, in that it is inherited by targets at generation time rather than when the target is created, is certainly confusing since it differs from most other directory properties, and has already been discussed in other issues.
However, it is not clear to me what the rationale is for CMP0059, since this policy option does not prevent add_definitions
and remove_definitions
from being used, it simply makes their already confusing behavior even more confusing, by making it impossible to query the DEFINITIONS property to determine which flags (if they are not -D options) have been set.