The documentation for the
$<COMMAND_CONFIG:...> generator expression (introduced in CMake 3.20) is a bit ambiguous regarding where it is allowed to be used. It states the following:
Only valid in
add_custom_target()as the outer-most generator expression in an argument.
What is meant by “argument” here? Does this mean that it can only appear in a
COMMAND, or does “argument” refer to any argument of
add_custom_target()? Put another way, is it legal to use
$<COMMAND_CONFIG:...> in something listed after
This arose in a recent Qt code review. It would be nice to get clarification so we understand what is intended to be formally supported and what isn’t.