diff options
author | Matthew Bentham <matthew.bentham@arm.com> | 2019-06-10 17:11:31 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-06-11 09:29:57 +0000 |
commit | 689471877bc6ae66489cbfa8734ce4f1ab085ab5 (patch) | |
tree | 4b001b2ef6630b39c27d20d52a4597518b0579c7 /src/armnnSerializer/CMakeLists.txt | |
parent | e315c8fafd145875ff2a22e2c050773f6be0359a (diff) | |
download | armnn-689471877bc6ae66489cbfa8734ce4f1ab085ab5.tar.gz |
Github #208 Search for flatc on standard paths
Change-Id: Ib5a77dc4b654c67d79f1f53e783b319c885b5215
Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Diffstat (limited to 'src/armnnSerializer/CMakeLists.txt')
-rwxr-xr-x | src/armnnSerializer/CMakeLists.txt | 9 |
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) |