summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GenEx-TARGET_FILE/TARGET_FILE_DIR-dependency.cmake
blob: e18ccd96ec8a3cb927a52729168b4c51fded181c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
set(CMAKE_POLICY_WARNING_CMP0112 TRUE)

enable_language (C)

add_executable (exec1 empty.c)

add_custom_target(copyFile
  COMMAND ${CMAKE_COMMAND} -E copy_if_different
        "${CMAKE_CURRENT_SOURCE_DIR}/empty.c"
        "$<TARGET_FILE_DIR:exec1>/$<TARGET_FILE_BASE_NAME:exec1>_e.c"
)
add_dependencies(exec1 copyFile)