From: 박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 Date: Mon, 19 Mar 2018 07:47:04 +0000 (+0900) Subject: Fix build problem with protoc (#66) X-Git-Tag: 0.1~664 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10a1661c5eb8850ede0088d5dd7a0e68d81550f9;p=platform%2Fcore%2Fml%2Fnnfw.git Fix build problem with protoc (#66) * Fix build problem with protoc This will fix arm cross build problem with protoc that may not be needed in target device * add protobuf_BUILD_TESTS inside if clause --- diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 210ffe6..adacdce 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -28,14 +28,15 @@ target_include_directories(eigen3 PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/eigen") # # Protocol Buffer (>= 3.5.1) # -set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build tests" FORCE) +# TODO add protobuf for arm cross build +if(ROOTFS_ARM STREQUAL "") + set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build tests" FORCE) -add_subdirectory(protobuf/cmake) + add_subdirectory(protobuf/cmake) # # TensorFlow Graph Definition Accessor # -# TODO Reduce indentation level list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/versions) list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/function) list(APPEND TF_GRAPH_PROTO_TAGS tensorflow/core/framework/types) @@ -60,6 +61,7 @@ add_subdirectory(protobuf/cmake) 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) +endif() # # Tensorflow Lite library diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index ab88628..ea8370f 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,3 +1,6 @@ -add_subdirectory(graphdump) +# TODO add graphdump for arm cross build +if(ROOTFS_ARM STREQUAL "") + add_subdirectory(graphdump) +endif() add_subdirectory(tflite_run) add_subdirectory(nnapi_bindings)