Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-04 07:59:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-04 08:00:37 +0300
commit72f8a08880515ae8e31b5909cc3182c1cc9b6913 (patch)
treeca5824b1f088582ec3efa2f7acc29a5c6ff55cc2 /CMakeLists.txt
parent43a2494058885d504d86a0b309281a6b1b1d4a65 (diff)
CMake: use path_ensure_trailing_slash for fmacro-prefix-map
Use the native system slash so this can work on windows.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8fe1a234cf..a55eeffb6ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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