Some generator expressions in custom targets (and commands) cause a null pointer read
The attached CMakeLists.txt causes cmake to crash in
cmGeneratorExpressionDAGChecker::GetTransitivePropertiesOnly() Line 149 with a null pointer read (the
this pointer is 0). It might not make sense to have
LINK_ONLY in this particular context, but a proper error message would be better than a crash.