CMakeLists.txt 330 B

12345678
  1. add_custom_command(
  2. OUTPUT output.txt
  3. COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output.txt
  4. )
  5. add_custom_target(CustomTarget ALL DEPENDS output.txt)
  6. add_custom_target(CustomTarget2 ALL DEPENDS output.txt)
  7. add_custom_target(CustomTarget3 ALL DEPENDS output.txt)
  8. add_custom_target(CustomTargetFail COMMAND DoesNotExist)