mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-26 04:09:35 +03:00
Define `$<TARGET_EXISTS:a>` to `1` if `a` is an existed target name, else `0`.
4 lines
134 B
CMake
4 lines
134 B
CMake
cmake_policy(SET CMP0070 NEW)
|
|
add_custom_target(foo)
|
|
file(GENERATE OUTPUT TARGET_EXISTS-generated.txt CONTENT "$<TARGET_EXISTS:foo>")
|