From 7a0851164431ce6a8f7149a668e600a049c12ab4 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Mon, 19 Oct 2020 19:15:46 +0800 Subject: [PATCH] update protobuf cmake --- CMakeLists.txt | 1 + cmake/external_libs/securec.cmake | 2 +- ge/CMakeLists.txt | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 779656a3..ee5730eb 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,7 @@ if (ENABLE_OPEN_SRC) set(HI_PYTHON python3.7) include(cmake/external_libs/protobuf_shared.cmake) + include(cmake/external_libs/protobuf_static.cmake) include(cmake/external_libs/protoc.cmake) include(cmake/external_libs/gflags.cmake) include(cmake/external_libs/securec.cmake) diff --git a/cmake/external_libs/securec.cmake b/cmake/external_libs/securec.cmake index bb3859a5..10ba5b22 100755 --- a/cmake/external_libs/securec.cmake +++ b/cmake/external_libs/securec.cmake @@ -14,7 +14,7 @@ ExternalProject_Add(c_sec_build URL https://gitee.com/openeuler/libboundscheck/repository/archive/v1.1.10.tar.gz #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz #SOURCE_DIR ${GE_CODE_DIR}/../libc_sec - PATCH_COMMAND patch -p1 < ${GE_CODE_DIR}/third_party/patch/securec/0001-add-securec-cmake-script.patch + PATCH_COMMAND patch -p1 < ${METADEF_DIR}/third_party/patch/securec/0001-add-securec-cmake-script.patch CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} diff --git a/ge/CMakeLists.txt b/ge/CMakeLists.txt index f692689b..d8093585 100755 --- a/ge/CMakeLists.txt +++ b/ge/CMakeLists.txt @@ -719,6 +719,8 @@ target_compile_options(opensrc_ascendcl PRIVATE ) target_link_options(opensrc_ascendcl PRIVATE -rdynamic + -Wl,--allow-multiple-definition + -Wl,-z,muldefs -Wl,-Bsymbolic -Wl,--exclude-libs,ALL )