From 97f96ef860065c5b1132bc5da146ec8793f6c814 Mon Sep 17 00:00:00 2001 From: Ferenc- Date: Tue, 21 Jun 2022 07:47:58 +0200 Subject: [PATCH] [cmake][opening_hours] Replace dependency on rsync (#2730) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [cmake][opening_hours] Replace dependency on rsync Signed-off-by: Ferenc Géczi * [cmake][opening_hours] Only skip rsync on Linux Signed-off-by: Ferenc Géczi * [cmake][opening_hours] Deduplicate command definition Signed-off-by: Ferenc Géczi --- .../opening_hours_integration_tests/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/3party/opening_hours/opening_hours_integration_tests/CMakeLists.txt b/3party/opening_hours/opening_hours_integration_tests/CMakeLists.txt index f40df27558..f099d549a1 100644 --- a/3party/opening_hours/opening_hours_integration_tests/CMakeLists.txt +++ b/3party/opening_hours/opening_hours_integration_tests/CMakeLists.txt @@ -6,7 +6,14 @@ omim_add_executable(${PROJECT_NAME} ${SRC}) target_link_libraries(${PROJECT_NAME} opening_hours) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(COPY_CMD cp -u) +else() + set(COPY_CMD rsync -a) +endif() + add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD - COMMAND rsync -a "${CMAKE_CURRENT_SOURCE_DIR}/opening-count.lst" "${CMAKE_BINARY_DIR}/" + COMMAND ${COPY_CMD} "${CMAKE_CURRENT_SOURCE_DIR}/opening-count.lst" "${CMAKE_BINARY_DIR}/" COMMENT "Copying opening-count.lst file for testing" )