Merge pull request !22 from taoxiangdong/masterpull/22/MERGE
| @@ -31,7 +31,6 @@ if (ENABLE_OPEN_SRC) | |||||
| set(GE_LIB_PATH ${GE_LIB_PATH}/${GE_SYS_ARCH}) | set(GE_LIB_PATH ${GE_LIB_PATH}/${GE_SYS_ARCH}) | ||||
| find_module(slog libslog.so ${GE_LIB_PATH}) | find_module(slog libslog.so ${GE_LIB_PATH}) | ||||
| find_module(mmpa libmmpa.so ${GE_LIB_PATH}) | find_module(mmpa libmmpa.so ${GE_LIB_PATH}) | ||||
| find_module(ge_common libge_common.so ${GE_LIB_PATH}) | |||||
| find_module(error_manager liberror_manager.so ${GE_LIB_PATH}) | find_module(error_manager liberror_manager.so ${GE_LIB_PATH}) | ||||
| else() | else() | ||||
| if(DEFINED ENV{ASCEND_CUSTOM_PATH}) | if(DEFINED ENV{ASCEND_CUSTOM_PATH}) | ||||
| @@ -45,16 +44,13 @@ if (ENABLE_OPEN_SRC) | |||||
| find_module(slog libslog.so ${ASCEND_DRIVER_DIR}) | find_module(slog libslog.so ${ASCEND_DRIVER_DIR}) | ||||
| find_module(mmpa libmmpa.so ${ASCEND_DRIVER_DIR}) | find_module(mmpa libmmpa.so ${ASCEND_DRIVER_DIR}) | ||||
| find_module(ge_common libge_common.so ${ASCEND_RUNTIME_DIR}) | |||||
| find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR}) | find_module(error_manager liberror_manager.so ${ASCEND_RUNTIME_DIR}) | ||||
| endif() | endif() | ||||
| if (NOT DEFINED METADEF_DIR) | if (NOT DEFINED METADEF_DIR) | ||||
| set(METADEF_DIR ${CMAKE_CURRENT_LIST_DIR}/metadef) | set(METADEF_DIR ${CMAKE_CURRENT_LIST_DIR}/metadef) | ||||
| add_subdirectory(metadef) | |||||
| endif() | endif() | ||||
| add_subdirectory(metadef) | |||||
| else() | else() | ||||
| ####工程tigong | ####工程tigong | ||||
| @@ -14,10 +14,10 @@ endif() | |||||
| set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2") | set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2") | ||||
| set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack") | set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack") | ||||
| ExternalProject_Add(protobuf_build | ExternalProject_Add(protobuf_build | ||||
| #URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz | |||||
| URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz | |||||
| #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz | #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz | ||||
| #SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 | |||||
| DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 <SOURCE_DIR> | |||||
| #SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 | |||||
| DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 <SOURCE_DIR> | |||||
| #CONFIGURE_COMMAND ${CMAKE_COMMAND} | #CONFIGURE_COMMAND ${CMAKE_COMMAND} | ||||
| #-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} | #-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} | ||||
| #-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | #-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | ||||
| @@ -15,7 +15,7 @@ endif() | |||||
| set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2") | set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2") | ||||
| set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack") | set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack") | ||||
| ExternalProject_Add(protoc_build | ExternalProject_Add(protoc_build | ||||
| #URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz | |||||
| URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz | |||||
| #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz | #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz | ||||
| SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 | SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 | ||||
| CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=${protobuf_CXXFLAGS} -DCMAKE_CXX_LDFLAGS=${protobuf_LDFLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/protoc <SOURCE_DIR>/cmake | CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=${protobuf_CXXFLAGS} -DCMAKE_CXX_LDFLAGS=${protobuf_LDFLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/protoc <SOURCE_DIR>/cmake | ||||
| @@ -14,7 +14,7 @@ ExternalProject_Add(c_sec_build | |||||
| URL https://gitee.com/openeuler/libboundscheck/repository/archive/v1.1.10.tar.gz | 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 | #URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz | ||||
| #SOURCE_DIR ${PARSER_DIR}/../libc_sec | #SOURCE_DIR ${PARSER_DIR}/../libc_sec | ||||
| PATCH_COMMAND patch -p1 < ${PARSER_DIR}/metadef/third_party/patch/securec/0001-add-securec-cmake-script.patch | |||||
| PATCH_COMMAND patch -p1 < ${PARSER_DIR}/metadef/third_party/patch/securec/0001-add-securec-cmake-script.patch | |||||
| CONFIGURE_COMMAND ${CMAKE_COMMAND} | CONFIGURE_COMMAND ${CMAKE_COMMAND} | ||||
| -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | ||||
| -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | ||||
| @@ -1 +1 @@ | |||||
| Subproject commit 693e892fa66c5da9b8976d93e5418ded2614fc4f | |||||
| Subproject commit c599dfd701ad1f7a7ef149faedcf2b5dec93fafb | |||||
| @@ -72,10 +72,10 @@ target_include_directories(fmk_parser PRIVATE | |||||
| ${METADEF_DIR}/inc/external/graph | ${METADEF_DIR}/inc/external/graph | ||||
| ${METADEF_DIR}/inc/external/register | ${METADEF_DIR}/inc/external/register | ||||
| #### independent compile ##### | #### independent compile ##### | ||||
| ${METADEF_DIR}/third_party/ge | |||||
| ${METADEF_DIR}/third_party/ge/inc | |||||
| ${METADEF_DIR}/third_party/ge/inc/framework | |||||
| ${METADEF_DIR}/third_party/ge/inc/external | |||||
| ${METADEF_DIR}/third_party/graphengine/ge | |||||
| ${METADEF_DIR}/third_party/graphengine/inc | |||||
| ${METADEF_DIR}/third_party/graphengine/inc/framework | |||||
| ${METADEF_DIR}/third_party/graphengine/inc/external | |||||
| ${METADEF_DIR}/third_party/fwkacllib/inc | ${METADEF_DIR}/third_party/fwkacllib/inc | ||||
| #### temp #### | #### temp #### | ||||
| ${PARSER_DIR}/../graphengine/inc/common/util | ${PARSER_DIR}/../graphengine/inc/common/util | ||||
| @@ -54,10 +54,10 @@ target_include_directories(parser_common PRIVATE | |||||
| ${METADEF_DIR}/inc/external/graph | ${METADEF_DIR}/inc/external/graph | ||||
| ${METADEF_DIR}/inc/external/register | ${METADEF_DIR}/inc/external/register | ||||
| #### independent compile ##### | #### independent compile ##### | ||||
| ${METADEF_DIR}/third_party/ge | |||||
| ${METADEF_DIR}/third_party/ge/inc | |||||
| ${METADEF_DIR}/third_party/ge/inc/framework | |||||
| ${METADEF_DIR}/third_party/ge/inc/external | |||||
| ${METADEF_DIR}/third_party/graphengine/ge | |||||
| ${METADEF_DIR}/third_party/graphengine/inc | |||||
| ${METADEF_DIR}/third_party/graphengine/inc/framework | |||||
| ${METADEF_DIR}/third_party/graphengine/inc/external | |||||
| ${METADEF_DIR}/third_party/fwkacllib/inc | ${METADEF_DIR}/third_party/fwkacllib/inc | ||||
| #### temp #### | #### temp #### | ||||
| ${PARSER_DIR}/../graphengine/inc/common/util | ${PARSER_DIR}/../graphengine/inc/common/util | ||||
| @@ -42,10 +42,10 @@ target_include_directories(fmk_onnx_parser PRIVATE | |||||
| ${METADEF_DIR}/inc/external/graph | ${METADEF_DIR}/inc/external/graph | ||||
| ${METADEF_DIR}/inc/external/register | ${METADEF_DIR}/inc/external/register | ||||
| #### independent compile ##### | #### independent compile ##### | ||||
| ${METADEF_DIR}/third_party/ge | |||||
| ${METADEF_DIR}/third_party/ge/inc | |||||
| ${METADEF_DIR}/third_party/ge/inc/framework | |||||
| ${METADEF_DIR}/third_party/ge/inc/external | |||||
| ${METADEF_DIR}/third_party/graphengine/ge | |||||
| ${METADEF_DIR}/third_party/graphengine/inc | |||||
| ${METADEF_DIR}/third_party/graphengine/inc/framework | |||||
| ${METADEF_DIR}/third_party/graphengine/inc/external | |||||
| ${METADEF_DIR}/third_party/fwkacllib/inc | ${METADEF_DIR}/third_party/fwkacllib/inc | ||||
| #### temp #### | #### temp #### | ||||
| ${PARSER_DIR}/../graphengine/inc/common/util | ${PARSER_DIR}/../graphengine/inc/common/util | ||||
| @@ -61,7 +61,6 @@ target_link_libraries(fmk_onnx_parser PRIVATE | |||||
| $<BUILD_INTERFACE:intf_pub> | $<BUILD_INTERFACE:intf_pub> | ||||
| -Wl,--no-as-needed | -Wl,--no-as-needed | ||||
| protobuf | protobuf | ||||
| ge_common | |||||
| register | register | ||||
| c_sec | c_sec | ||||
| parser_common | parser_common | ||||