Files
CMake/Tests/RunCMake/GeneratorExpression/TARGET_EXISTS-not-a-target-check.cmake
Alex Turbov 7fec336bf7 genex: Add TARGET_EXISTS to check for target existence
Define `$<TARGET_EXISTS:a>` to `1` if `a` is an existed target name,
else `0`.
2018-03-09 08:24:05 -05:00

7 lines
247 B
CMake

file(READ "${RunCMake_TEST_BINARY_DIR}/TARGET_EXISTS-not-a-target-generated.txt" content)
set(expected "0")
if(NOT content STREQUAL expected)
set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]")
endif()