Build flatbuffer and install flatc (#148)
author오형석/동작제어Lab(SR)/Senior Engineer/삼성전자 <hseok82.oh@samsung.com>
Sun, 25 Mar 2018 23:33:29 +0000 (08:33 +0900)
committer서상민/동작제어Lab(SR)/Senior Engineer/삼성전자 <sangmin7.seo@samsung.com>
Sun, 25 Mar 2018 23:33:29 +0000 (08:33 +0900)
Build flatbuffer when native build and host is x86_64
Install flatc to use model tflite file for parsing and compile

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
externals/CMakeLists.txt
externals/flatbuffers/CMakeLists.txt

index a968fd1..1cba013 100644 (file)
@@ -53,6 +53,8 @@ if(BUILD_IS_NATIVE AND NOT HOST_ARCH_BASE STREQUAL "arm")
   add_library(tensorflow_graphdef ${TF_GRAPH_PROTO_SRCS})
   target_include_directories(tensorflow_graphdef PUBLIC ${TF_GRAPH_PROTO_GENERATED})
   target_link_libraries(tensorflow_graphdef PUBLIC libprotobuf)
+
+  add_subdirectory(flatbuffers)
 endif()
 
 #
index 16a70b8..21decdf 100644 (file)
@@ -126,8 +126,7 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
         "${CMAKE_CXX_FLAGS} -faligned-new")
     endif()
     set(CMAKE_CXX_FLAGS
-      "${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result \
-                          -Wunused-parameter -Werror=unused-parameter")
+      "${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result -Wunused-parameter -Werror=unused-parameter")
   endif()
 
   # Certain platforms such as ARM do not use signed chars by default
@@ -293,7 +292,6 @@ if(FLATBUFFERS_INSTALL)
     install(
       TARGETS flatc EXPORT FlatcTargets
       RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-      CONFIGURATIONS Release
     )
 
     install(