You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
459 B

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}")