Skip to content

Genex: Fix value lifetimes in nested TARGET_PROPERTY evaluation

For special properties like INCLUDE_DIRECTORIES, the pointer returned by cmTarget::GetProperty is only valid until the next time the same special property is queried on any target. When evaluating a nested TARGET_PROPERTY generator expression we may look up such a property more than once on different targets. Fix TargetPropertyNode::Evaluate to store the lookup result in locally owned memory earlier.

Fixes: #19286 (closed)

Merge request reports