forked from OSSInnovation/mindspore
!13044 __file__ should return relative path of file
From: @nicholas_yhr Reviewed-by: Signed-off-by:
This commit is contained in:
commit
36c553458e
|
@ -19,8 +19,11 @@ endfunction()
|
|||
if(ENABLE_D OR ENABLE_ACL OR ENABLE_TESTCASES)
|
||||
set(_ge_tmp_CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set(_ge_tmp_ENABLE_GITEE ${ENABLE_GITEE})
|
||||
set(_ge_tmp_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
set(ENABLE_GITEE ON)
|
||||
set(CMAKE_INSTALL_PREFIX ${BUILD_PATH}/graphengine)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILE__='\"$(subst $(realpath ${CMAKE_SOURCE_DIR})/,,$(abspath $<))\"' \
|
||||
-Wno-builtin-macro-redefined")
|
||||
|
||||
if(ENABLE_TESTCASES)
|
||||
# use slog, error manager, mmpa in non ascend mode, e.g. tests
|
||||
|
@ -35,6 +38,7 @@ if(ENABLE_D OR ENABLE_ACL OR ENABLE_TESTCASES)
|
|||
add_subdirectory(${GE_SOURCE_DIR})
|
||||
set(CMAKE_INSTALL_PREFIX ${_ge_tmp_CMAKE_INSTALL_PREFIX})
|
||||
set(ENABLE_GITEE ${_ge_tmp_ENABLE_GITEE})
|
||||
set(CMAKE_CXX_FLAGS ${_ge_tmp_CMAKE_CXX_FLAGS})
|
||||
else()
|
||||
message(FATAL_ERROR "No compile option defined for GraphEngine, exiting")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue