| 1 |
add_custom_command( |
| 2 |
OUTPUT output1.txt |
| 3 |
COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output1.txt |
| 4 |
) |
| 5 |
add_custom_target(CustomTarget ALL DEPENDS output1.txt) |
| 6 |
|
| 7 |
add_custom_command( |
| 8 |
OUTPUT output2.txt |
| 9 |
COMMAND ${CMAKE_COMMAND} -E echo CustomCommand2 > output2.txt |
| 10 |
) |
| 11 |
add_custom_target(CustomTarget2 ALL DEPENDS output2.txt) |
| 12 |
|
| 13 |
add_custom_command( |
| 14 |
OUTPUT output3.txt |
| 15 |
COMMAND ${CMAKE_COMMAND} -E echo CustomCommand2 > output3.txt |
| 16 |
) |
| 17 |
add_custom_target(CustomTarget3 ALL DEPENDS output3.txt) |
| 18 |
|
| 19 |
add_custom_target(CustomTargetFail COMMAND DoesNotExist) |