CMakeLists.txt 563 B

1234567891011121314151617181920
  1. cmake_minimum_required(VERSION 3.14)
  2. project(ExplicitDirs NONE)
  3. add_custom_command(
  4. OUTPUT output1.txt
  5. COMMAND ${CMAKE_COMMAND} -E echo CustomCommand > output1.txt
  6. )
  7. add_custom_target(CustomTarget ALL DEPENDS output1.txt)
  8. add_custom_command(
  9. OUTPUT output2.txt
  10. COMMAND ${CMAKE_COMMAND} -E echo CustomCommand2 > output2.txt
  11. )
  12. add_custom_target(CustomTarget2 ALL DEPENDS output2.txt)
  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)