blob: 8ce26c4c7eb3c0fd7dac95636605016b8ca06704 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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)
|