1 Star 0 Fork 375

taoxiangdong/metadef

forked from Ascend/metadef 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.78 KB
一键复制 编辑 原始数据 按行查看 历史
yangyongqiang 提交于 2020-12-10 17:44 . ONLY_COMPILE_OPEN_SRC_METADEF
cmake_minimum_required(VERSION 3.14)
project (MetaDef[CXX])
set(METADEF_DIR ${CMAKE_CURRENT_LIST_DIR})
option(ENABLE_OPEN_SRC "Enable graphengine compile in opensource." FALSE)
option(ONLY_COMPILE_OPEN_SRC_METADEF "Enable compile in metadef opensource." FALSE)
if (ENABLE_OPEN_SRC)
set(HI_PYTHON python3.7)
include(cmake/external_libs/protobuf_shared.cmake)
include(cmake/external_libs/protoc.cmake)
include(cmake/external_libs/securec.cmake)
include(cmake/external_libs/json.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 libslog.so ${GE_LIB_PATH})
find_module(mmpa libmmpa.so ${GE_LIB_PATH})
find_module(error_manager liberror_manager.so ${GE_LIB_PATH})
else()
if(DEFINED ENV{ASCEND_CUSTOM_PATH})
set(ASCEND_DIR $ENV{ASCEND_CUSTOM_PATH})
else()
set(ASCEND_DIR /usr/local/Ascend)
endif()
set(ASCEND_ATC_DIR ${ASCEND_DIR}/atc/lib64)
find_module(slog libslog.so ${ASCEND_ATC_DIR})
find_module(mmpa libmmpa.so ${ASCEND_ATC_DIR})
find_module(error_manager liberror_manager.so ${ASCEND_ATC_DIR})
endif()
endif()
add_subdirectory(graph)
add_subdirectory(register)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/taoxiangdong/metadef.git
git@gitee.com:taoxiangdong/metadef.git
taoxiangdong
metadef
metadef
master

搜索帮助