diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-09-12 11:22:42 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-15 18:22:47 +0200 |
commit | 309ff4a870d66df18783e360674cf9ad5bd26a46 (patch) | |
tree | c69fce1a01497ace46cb8085e9d0d2030c4524ef /cmake/cmake.d/03-macros.cmake | |
parent | 52e877d0160edbc96bcfcd7d9a4b05db3602963b (diff) |
Don't fails if data files checker not found.
Change-Id: If28a37406175dc318c3ed62153e3276f2eb77525
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d/03-macros.cmake')
-rw-r--r-- | cmake/cmake.d/03-macros.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake index 89b93f6..9b1b5a9 100644 --- a/cmake/cmake.d/03-macros.cmake +++ b/cmake/cmake.d/03-macros.cmake @@ -153,21 +153,21 @@ macro(add_input_files INPUT_FILES) add_custom_command(TARGET ${TARGET_NAME} PRE_BUILD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${XML_CHECKER} ${file} + COMMAND which ${XML_CHECKER} && ${XML_CHECKER} ${file} || ${CMAKE_COMMAND} -E cmake_echo_color --red "Warning: XML_CHECKER not found" ) endforeach() foreach(file ${LUA_LIST}) add_custom_command(TARGET ${TARGET_NAME} PRE_BUILD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${LUA_CHECKER} ${file} + COMMAND which ${LUA_CHECKER} && ${LUA_CHECKER} ${file} || ${CMAKE_COMMAND} -E cmake_echo_color --red "Warning: LUA_CHECKER not found" ) endforeach() foreach(file ${JSON_LIST}) add_custom_command(TARGET ${TARGET_NAME} PRE_BUILD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND cat ${file} | ${JSON_CHECKER} + COMMAND which ${JSON_CHECKER} && ${JSON_CHECKER} ${file} || ${CMAKE_COMMAND} -E cmake_echo_color --red "Warning: JSON_CHECKER not found" ) endforeach() |