From 0db74f80bbda624ba2e03b67d3bf190dfdc1a7d0 Mon Sep 17 00:00:00 2001 From: yanghaoran Date: Thu, 9 Apr 2020 14:48:01 +0800 Subject: [PATCH] add custom environment variable ASCEND_CUSTOM_PATH, for customized Ascend software installation --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 358334c2..0ca9fcee 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,7 +75,11 @@ elseif(DEFINED ENV{D_LINK_PATH}) find_library(resource libresource.so ${GE_LIB_PATH}) else() # Ascend mode - set(HIAI_INSTALLED_DIR /usr/local/Ascend) + if(DEFINED ENV{ASCEND_CUSTOM_PATH}) + set(HIAI_INSTALLED_DIR $ENV{D_LINK_PATH}) + else() + set(HIAI_INSTALLED_DIR /usr/local/Ascend) + endif() set(HIAI_DRIVER_DIR ${HIAI_INSTALLED_DIR}/driver/lib64/common) set(HIAI_RUNTIME_DIR ${HIAI_INSTALLED_DIR}/fwkacllib/lib64) find_library(c_sec libc_sec.so ${HIAI_DRIVER_DIR})