summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/add_custom_command/ConfigureFile.cmake
blob: ca53a6cacbed3aded8f9d151fb14655c54f7ec5f (plain)
1
2
3
4
5
6
7
8
9
configure_file(ConfigureFile.in foo.txt @ONLY)
add_custom_target(foo)
add_custom_command(
  OUTPUT bar.txt
  MAIN_DEPENDENCY ConfigureFile.in # Attach to input of configure_file
  DEPENDS foo
  COMMAND ${CMAKE_COMMAND} -E copy foo.txt bar.txt
  )
add_custom_target(bar DEPENDS bar.txt)