aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/armnnSerializer/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/armnnSerializer/CMakeLists.txt b/src/armnnSerializer/CMakeLists.txt
index af2262d5fa..225999bbc4 100755
--- a/src/armnnSerializer/CMakeLists.txt
+++ b/src/armnnSerializer/CMakeLists.txt
@@ -3,10 +3,17 @@
# SPDX-License-Identifier: MIT
#
if(BUILD_ARMNN_SERIALIZER)
+ find_program(FLATC flatc
+ 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=<flatc path>")
+ endif()
+
add_custom_command(
# Generate an ArmnnSchema_generated.h file if it doesn't exist, or update it when necessary otherwise
OUTPUT ArmnnSchema_generated.h DEPENDS ArmnnSchema.fbs
- COMMAND ${FLATC_DIR}/flatc -o ${CMAKE_CURRENT_BINARY_DIR} --cpp ${CMAKE_CURRENT_SOURCE_DIR}/ArmnnSchema.fbs
+ COMMAND ${FLATC} -o ${CMAKE_CURRENT_BINARY_DIR} --cpp ${CMAKE_CURRENT_SOURCE_DIR}/ArmnnSchema.fbs
)
set(armnn_serializer_sources)