CMake: use path_ensure_trailing_slash for fmacro-prefix-map
Use the native system slash so this can work on windows.
This commit is contained in:
parent
43a2494058
commit
72f8a08880
@ -1678,10 +1678,14 @@ if(WITH_COMPILER_SHORT_FILE_MACRO)
|
||||
endif()
|
||||
endif()
|
||||
if(WITH_COMPILER_SHORT_FILE_MACRO)
|
||||
path_ensure_trailing_slash(_src_dir "${CMAKE_SOURCE_DIR}")
|
||||
path_ensure_trailing_slash(_bin_dir "${CMAKE_BINARY_DIR}")
|
||||
set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} \
|
||||
-fmacro-prefix-map='${CMAKE_SOURCE_DIR}/'='' \
|
||||
-fmacro-prefix-map='${CMAKE_BINARY_DIR}/'=''"
|
||||
-fmacro-prefix-map=\"${_src_dir}\"=\"\" \
|
||||
-fmacro-prefix-map=\"${_bin_dir}\"=\"\""
|
||||
)
|
||||
unset(_src_dir)
|
||||
unset(_bin_dir)
|
||||
endif()
|
||||
else()
|
||||
message_first_run(WARNING
|
||||
|
Loading…
Reference in New Issue
Block a user