CMake/Tests/RunCMake/GeneratorExpression/LINK_ONLY-not-linking.cmake
Brad King f6fd0abc5b Genex: Diagnose invalid LINK_ONLY usage instead of crashing
When `$<LINK_ONLY:...>` is used outside of linking we may evaluate it
without a `dagChecker`.  Do not dereference the NULL pointer and issue a
diagnostic instead.

Closes: #16287
2016-09-05 09:06:00 -04:00

2 lines
86 B
CMake

add_custom_target(Custom ALL COMMAND ${CMAKE_COMMAND} -E echo $<LINK_ONLY:something>)