Re-enable WITH_COMPILER_SHORT_FILE_MACRO, fix build error.

The issue was in `buildinfo.c`:
  char build_c[xx]flags[] = BUILD_C[XX]FLAGS;

Non-escaped double-quotes were terminating the string early, and
causing the compile error. So use single-quotes.
This commit is contained in:
Ankit Meel 2020-11-02 16:11:10 +05:30
parent 19dec6c8a7
commit f2c7b4a1c5
1 changed files with 3 additions and 3 deletions

View File

@ -571,7 +571,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
option(WITH_COMPILER_SHORT_FILE_MACRO "Make paths in macros like __FILE__ relative to top level source and build directories." OFF)
option(WITH_COMPILER_SHORT_FILE_MACRO "Make paths in macros like __FILE__ relative to top level source and build directories." ON)
mark_as_advanced(WITH_COMPILER_SHORT_FILE_MACRO)
endif()
@ -1679,8 +1679,8 @@ if(WITH_COMPILER_SHORT_FILE_MACRO)
endif()
if(WITH_COMPILER_SHORT_FILE_MACRO)
set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} \
-fmacro-prefix-map=\"${CMAKE_SOURCE_DIR}/\"=\"\" \
-fmacro-prefix-map=\"${CMAKE_BINARY_DIR}/\"=\"\""
-fmacro-prefix-map='${CMAKE_SOURCE_DIR}/'='' \
-fmacro-prefix-map='${CMAKE_BINARY_DIR}/'=''"
)
endif()
else()