From 44a84f905cfab6a55c4111aa2c50b66e53f1223d Mon Sep 17 00:00:00 2001 From: Shobhit Adlakha Date: Thu, 12 Mar 2020 10:50:39 -0400 Subject: Use cmake copy_if_different command instead of cmp --- src/components/interfaces/CMakeLists.txt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/interfaces/CMakeLists.txt b/src/components/interfaces/CMakeLists.txt index d88bdc3d1d..7b0ec63d3a 100644 --- a/src/components/interfaces/CMakeLists.txt +++ b/src/components/interfaces/CMakeLists.txt @@ -30,14 +30,12 @@ # Copy RPC spec submodule files to interfaces directory if(EXISTS ${CMAKE_SOURCE_DIR}/tools/rpc_spec/) - execute_process(COMMAND cmp --silent ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xml ${CMAKE_CURRENT_SOURCE_DIR}/MOBILE_API.xml RESULT_VARIABLE ret) - if(NOT ret EQUAL "0") - execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xml ${CMAKE_CURRENT_SOURCE_DIR}/) - endif() - execute_process(COMMAND cmp --silent ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xsd ${CMAKE_CURRENT_SOURCE_DIR}/MOBILE_API.xsd RESULT_VARIABLE ret) - if(NOT ret EQUAL "0") - execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xsd ${CMAKE_CURRENT_SOURCE_DIR}/) - endif() + execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xml + ${CMAKE_CURRENT_SOURCE_DIR}/MOBILE_API.xml) + execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xsd + ${CMAKE_CURRENT_SOURCE_DIR}/MOBILE_API.xsd) else () message( FATAL_ERROR "Missing the RPC Spec submodule" ) message( FATAL_ERROR "Please run `git submodule update --init` in the SDL Core source directory" ) -- cgit v1.2.1