2006-11-27 23:14:42 +03:00
|
|
|
if(NOT CMAKE_BINARY_DIR STREQUAL "${CMAKE_SOURCE_DIR}")
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hello_world
|
2012-08-13 21:42:58 +04:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
2006-11-27 23:14:42 +03:00
|
|
|
${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
|
|
|
|
)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|