mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
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.
15 lines
508 B
CMake
15 lines
508 B
CMake
add_custom_command(
|
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/a"
|
|
COMMAND b
|
|
)
|
|
add_custom_target(CollapseFullPath
|
|
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/a"
|
|
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/../GeneratedProperty-build/c"
|
|
COMMAND d
|
|
)
|
|
get_source_file_property(GENERATED_A "${CMAKE_CURRENT_BINARY_DIR}/a" GENERATED)
|
|
get_source_file_property(GENERATED_C "${CMAKE_CURRENT_BINARY_DIR}/c" GENERATED)
|
|
if(NOT GENERATED_A OR NOT GENERATED_C)
|
|
message(FATAL_ERROR "failed")
|
|
endif()
|