!489 Fix __FILE__ macro when symbolic links exist in the path to code directory

Merge pull request !489 from yanghaoran/master
This commit is contained in:
mindspore-ci-bot 2020-04-20 22:02:36 +08:00 committed by Gitee
commit ac83d09651
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ set(_ge_tmp_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REPLACE " -Wall" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE " -Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# force __FILE__ to show relative path of file, from source directory
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILE__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"' -Wno-builtin-macro-redefined")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILE__='\"$(subst $(realpath ${CMAKE_SOURCE_DIR})/,,$(abspath $<))\"' -Wno-builtin-macro-redefined")
add_subdirectory(${GE_SOURCE_DIR}/src/common/graph)
if(ENABLE_D)
add_subdirectory(${GE_SOURCE_DIR}/src/ge/common)

@ -1 +1 @@
Subproject commit 0c33e9d12562953ca4bd6c03cb77da2c2da74acd
Subproject commit 43f5d24337bf785251eefae2d810c7d5684194d6