From 29fde27f863ce82a2604270cfa7216904f1f171b Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Tue, 9 Feb 2021 16:46:14 +0000 Subject: IVGCVSW-5679 Fix Android NDK OOB build * Specific OOB builds will fail if flatc is not available. * flatc command is now only run if found. Signed-off-by: Matthew Sloyan Change-Id: Iab6e082fe35dc3c3dfb78a29e1630c9edbb80be6 --- src/backends/cl/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backends/cl/CMakeLists.txt b/src/backends/cl/CMakeLists.txt index 60cdaa314d..78771a027e 100644 --- a/src/backends/cl/CMakeLists.txt +++ b/src/backends/cl/CMakeLists.txt @@ -8,15 +8,15 @@ if(ARMCOMPUTECL) HINTS ${FLATC_DIR} DOC "Path to 'flatc', the flatbuffers compiler") if (NOT FLATC) - message(SEND_ERROR "flatc not found. Specify the full path of the flatc executable with -DFLATC=") + message(WARNING "flatc not found. Specify the full path of the flatc executable with -DFLATC=") + else() + add_custom_command( + # Updates ClContextSchema_generated.h if changes are made. + OUTPUT ClContextSchema_generated.h DEPENDS ClContextSchema.fbs + COMMAND ${FLATC} -o ${CMAKE_CURRENT_BINARY_DIR} --cpp ${CMAKE_CURRENT_SOURCE_DIR}/ClContextSchema.fbs + ) endif() - add_custom_command( - # Generate an ClContextSchema_generated.h file if it doesn't exist, or update it when necessary otherwise - OUTPUT ClContextSchema_generated.h DEPENDS ClContextSchema.fbs - COMMAND ${FLATC} -o ${CMAKE_CURRENT_BINARY_DIR} --cpp ${CMAKE_CURRENT_SOURCE_DIR}/ClContextSchema.fbs - ) - list(APPEND armnnClBackend_sources ClContextSchema_generated.h ClBackend.cpp -- cgit v1.2.1