CMP0058-common.cmake 559 B

1234567891011121314151617
  1. add_custom_command(
  2. OUTPUT output1
  3. ${byproducts}
  4. COMMAND ${CMAKE_COMMAND} -E touch output1
  5. COMMAND ${CMAKE_COMMAND} -E touch byproduct1a
  6. COMMAND ${CMAKE_COMMAND} -E touch byproduct1b
  7. )
  8. add_custom_target(Drive1 ALL DEPENDS output1)
  9. add_custom_command(
  10. OUTPUT output2
  11. COMMAND ${CMAKE_COMMAND} -E copy output1 output2
  12. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/output1
  13. ${CMAKE_CURRENT_BINARY_DIR}/byproduct1a
  14. ${CMAKE_CURRENT_BINARY_DIR}/byproduct1b
  15. )
  16. add_custom_target(Drive2 ALL DEPENDS output2)
  17. add_dependencies(Drive2 Drive1)