summaryrefslogtreecommitdiff
path: root/Tests/TargetName/scripts/CMakeLists.txt
blob: 40d4e2fb0a17f119692976b28fa872b0e818df8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
if(NOT CMAKE_BINARY_DIR STREQUAL "${CMAKE_SOURCE_DIR}")
  add_custom_command(
  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hello_world
  COMMAND ${CMAKE_COMMAND} -E copy 
  ${CMAKE_CURRENT_SOURCE_DIR}/hello_world ${CMAKE_CURRENT_BINARY_DIR}
  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/hello_world
  )
  add_custom_target(
  hello_world_copy ALL
  DEPENDS #hello_world
  ${CMAKE_CURRENT_BINARY_DIR}/hello_world
  )
endif(NOT CMAKE_BINARY_DIR STREQUAL "${CMAKE_SOURCE_DIR}")