1 Star 0 Fork 377

万学磊/metadef

forked from Ascend/metadef 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.98 KB
一键复制 编辑 原始数据 按行查看 历史
盛楠 提交于 2021-03-14 18:57 . Fix the UT compile error for error_manager
cmake_minimum_required(VERSION 3.14)
project (MetaDef[CXX])
set(METADEF_DIR ${CMAKE_CURRENT_LIST_DIR})
if (DEFINED ENV{D_PKG_SERVER})
set(METADEF_PB_PKG $ENV{D_PKG_SERVER})
endif()
option(ENABLE_OPEN_SRC "Enable graphengine compile in opensource." FALSE)
if (ENABLE_OPEN_SRC)
set(HI_PYTHON python3)
include(cmake/external_libs/protobuf_shared.cmake)
include(cmake/external_libs/protobuf_static.cmake)
include(cmake/external_libs/protoc.cmake)
include(cmake/external_libs/securec.cmake)
include(cmake/external_libs/json.cmake)
include(cmake/external_libs/gtest.cmake)
include(cmake/FindModule.cmake)
include(cmake/intf_pub_linux.cmake)
if(DEFINED ENV{D_LINK_PATH})
# D_LINK_PATH is set
set(GE_LIB_PATH $ENV{D_LINK_PATH})
set(GE_SYS_ARCH "")
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
# x86 ubuntu
set(GE_SYS_ARCH "x86_64")
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
# arm euleros
set(GE_SYS_ARCH "aarch64")
else()
message(FATAL_ERROR "Running on a unsupported architecture: ${SYSTEM_TYPE}, build terminated")
endif()
set(GE_LIB_PATH ${GE_LIB_PATH}/${GE_SYS_ARCH})
find_module(slog libalog.so ${GE_LIB_PATH})
find_module(static_mmpa libmmpa.a ${GE_LIB_PATH})
elseif(DEFINED ENV{ASCEND_CUSTOM_PATH})
set(ASCEND_DIR $ENV{ASCEND_CUSTOM_PATH})
set(ASCEND_ATC_DIR ${ASCEND_DIR}/atc/lib64)
find_module(slog libalog.so ${ASCEND_ATC_DIR})
find_module(static_mmpa libmmpa.a ${ASCEND_ATC_DIR})
endif()
if(ENABLE_GE_COV OR ENABLE_GE_UT)
message(STATUS "Runing on llt mode, no need to depend other component")
elseif(ENABLE_METADEF_UT OR ENABLE_METADEF_COV)
add_subdirectory(tests)
endif()
endif()
add_subdirectory(graph)
add_subdirectory(error_manager)
if (NOT ENABLE_D AND NOT ENABLE_ACL AND NOT ENABLE_MS_TESTCASES)
add_subdirectory(register)
endif ()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wan_xuelei/metadef.git
git@gitee.com:wan_xuelei/metadef.git
wan_xuelei
metadef
metadef
master

搜索帮助