You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Tests/RunCMake/Make/CMP0113-Common.cmake

18 lines
491 B

add_custom_command(
OUTPUT output-not-created
COMMAND ${CMAKE_COMMAND} -E echo output-not-created
DEPENDS ${CMAKE_CURRENT_LIST_FILE}
VERBATIM
)
add_custom_command(
OUTPUT output-created
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_FILE} output-created
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/output-not-created
VERBATIM
)
add_custom_target(drive1 ALL DEPENDS output-not-created)
add_custom_target(drive2 ALL DEPENDS output-created)
add_dependencies(drive2 drive1)