diff options
author | Shobhit Adlakha <ShobhitAd@users.noreply.github.com> | 2020-03-12 11:50:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-12 11:50:53 -0400 |
commit | bef65ecacb119e2585ec3f09053132a1063bfb66 (patch) | |
tree | 04ae1e5c1001110662a443a07804387e862a3e20 | |
parent | de574b1336e2e06f2e4af4ded9060a5fcc9a2137 (diff) | |
download | sdl_core-bef65ecacb119e2585ec3f09053132a1063bfb66.tar.gz |
Fix/Perform hash check before copying over mobile api files (#3288)
* Compare MOBILE_API files in the submodule directory against the ones in the interfaces directory before copying
* Use cmake copy_if_different command instead of cmp
* Remove trailing whitespace
-rw-r--r-- | src/components/interfaces/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/interfaces/CMakeLists.txt b/src/components/interfaces/CMakeLists.txt index 6b866eb2a9..7f1a65277d 100644 --- a/src/components/interfaces/CMakeLists.txt +++ b/src/components/interfaces/CMakeLists.txt @@ -30,8 +30,12 @@ # Copy RPC spec submodule files to interfaces directory if(EXISTS ${CMAKE_SOURCE_DIR}/tools/rpc_spec/) - execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xml ${CMAKE_CURRENT_SOURCE_DIR}/) - execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/tools/rpc_spec/MOBILE_API.xsd ${CMAKE_CURRENT_SOURCE_DIR}/) + 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" ) |