Files
cmake/Tests/RunCMake/GeneratorExpression/TARGET_NAME_IF_EXISTS-not-a-target-check.cmake
Alex Turbov 7b173a2933 genex: Add TARGET_NAME_IF_EXISTS expression
Define `$<TARGET_NAME_IF_EXISTS:tgt>` to mean `tgt` if the target
exists and otherwise an empty string.
2018-03-28 08:38:00 -04:00

6 lines
212 B
CMake

file(READ "${RunCMake_TEST_BINARY_DIR}/TARGET_NAME_IF_EXISTS-not-a-target-generated.txt" content)
if(content)
set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected an empty string")
endif()