From: @wan_xuelei Reviewed-by: @xchu42,@wqtshg Signed-off-by:pull/1289/MERGE
| @@ -1,3 +1,7 @@ | |||||
| if (HAVE_PROTOBUF_STATIC) | |||||
| return() | |||||
| endif() | |||||
| include(ExternalProject) | include(ExternalProject) | ||||
| include(GNUInstallDirs) | include(GNUInstallDirs) | ||||
| #set(CMAKE_INSTALL_PREFIX ${GE_CODE_DIR}/output) | #set(CMAKE_INSTALL_PREFIX ${GE_CODE_DIR}/output) | ||||
| @@ -57,3 +61,5 @@ include_directories(${PROTOBUF_STATIC_PKG_DIR}/include) | |||||
| endif () | endif () | ||||
| add_dependencies(ascend_protobuf_static protobuf_static_build) | add_dependencies(ascend_protobuf_static protobuf_static_build) | ||||
| set(HAVE_PROTOBUF_STATIC TRUE) | |||||
| @@ -12,7 +12,7 @@ set(PROTO_LIST | |||||
| "${METADEF_DIR}/proto/tensorflow/tensor.proto" | "${METADEF_DIR}/proto/tensorflow/tensor.proto" | ||||
| "${METADEF_DIR}/proto/tensorflow/tensor_shape.proto" | "${METADEF_DIR}/proto/tensorflow/tensor_shape.proto" | ||||
| "${METADEF_DIR}/proto/tensorflow/types.proto" | "${METADEF_DIR}/proto/tensorflow/types.proto" | ||||
| "${METADEF_DIR}/proto/tensorflow/versions.proto" | |||||
| "${METADEF_DIR}/proto/tensorflow/versions.proto" | |||||
| ) | ) | ||||
| protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST}) | protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST}) | ||||
| @@ -163,7 +163,7 @@ target_include_directories(ge_common_static PRIVATE | |||||
| target_link_libraries(ge_common_static PRIVATE | target_link_libraries(ge_common_static PRIVATE | ||||
| $<BUILD_INTERFACE:intf_pub> | $<BUILD_INTERFACE:intf_pub> | ||||
| ascend_protobuf | |||||
| ascend_protobuf_static | |||||
| json | json | ||||
| c_sec | c_sec | ||||
| $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> | $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> | ||||
| @@ -197,7 +197,7 @@ target_include_directories(ge_executor PRIVATE | |||||
| target_link_libraries(ge_executor PRIVATE | target_link_libraries(ge_executor PRIVATE | ||||
| $<BUILD_INTERFACE:intf_pub> | $<BUILD_INTERFACE:intf_pub> | ||||
| json | json | ||||
| ascend_protobuf | |||||
| ascend_protobuf_static | |||||
| c_sec | c_sec | ||||
| $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> | $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> | ||||
| -ldl | -ldl | ||||