aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/CopyDir.cmake
blob: 319b899f9dac6f54cf5cf3626fc88df03060b124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function(llvm_copy_dir target to) # args: dir0 dir1 ...
  set(COPY_COMMAND "")
  foreach(dir ${ARGN})
    set(COPY_COMMAND ${COPY_COMMAND} COMMAND ${CMAKE_COMMAND} -E copy_directory "${dir}" "${to}")
  endforeach()
  add_custom_command(
    TARGET ${target} POST_BUILD
    ${COPY_COMMAND}
  )
endfunction()

function(llvm_copy target to from)
  add_custom_command(
    TARGET ${target} POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy ${from} ${to}
  )
endfunction()