mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 09:18:54 -05:00
Merge pull request #1009 from srcejon/cmake_copy_if_different
external/CMakeLists.txt: Only copy files if different to avoid unnecessary rebuilds
This commit is contained in:
commit
e3a3e440f2
4
external/CMakeLists.txt
vendored
4
external/CMakeLists.txt
vendored
@ -114,7 +114,7 @@ if (LINUX)
|
||||
macro(makeCopyFile src dest target)
|
||||
if (NOT EXISTS ${dest})
|
||||
add_custom_command(TARGET ${target} PRE_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${src} ${dest} DEPENDS ${dest} COMMENT "copy ${src} -> ${dest}")
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dest} DEPENDS ${dest} COMMENT "copy ${src} -> ${dest}")
|
||||
endif ()
|
||||
endmacro()
|
||||
else ()
|
||||
@ -138,7 +138,7 @@ else ()
|
||||
macro(makeCopy src dest target)
|
||||
if (NOT EXISTS ${dest})
|
||||
add_custom_command(TARGET ${target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${src} ${dest} DEPENDS ${dest} COMMENT "copy ${src} -> ${dest}")
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dest} DEPENDS ${dest} COMMENT "copy ${src} -> ${dest}")
|
||||
endif ()
|
||||
endmacro()
|
||||
endif (LINUX)
|
||||
|
Loading…
Reference in New Issue
Block a user