aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Bentham <matthew.bentham@arm.com>2019-06-10 17:11:31 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-06-11 09:29:57 +0000
commit689471877bc6ae66489cbfa8734ce4f1ab085ab5 (patch)
tree4b001b2ef6630b39c27d20d52a4597518b0579c7
parente315c8fafd145875ff2a22e2c050773f6be0359a (diff)
downloadarmnn-689471877bc6ae66489cbfa8734ce4f1ab085ab5.tar.gz
Github #208 Search for flatc on standard paths
Change-Id: Ib5a77dc4b654c67d79f1f53e783b319c885b5215 Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
-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)