CMake/Tests/RunCMake/add_custom_command/GeneratedProperty.cmake
Daniel Eiband 3b409643bd Byproducts: Add test for collapsing of full paths in byproducts
Add test for collapsing of full paths in byproducts and additional tests for
the GENERATED source file properties set by add_custom_command and
add_custom_target with relative paths.
2019-09-16 10:24:24 +02:00

11 lines
415 B
CMake

add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/a"
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/b"
COMMAND c
)
get_source_file_property(GENERATED_A "${CMAKE_CURRENT_BINARY_DIR}/a" GENERATED)
get_source_file_property(GENERATED_B "${CMAKE_CURRENT_BINARY_DIR}/b" GENERATED)
if(NOT GENERATED_A OR NOT GENERATED_B)
message(FATAL_ERROR "failed")
endif()