diff options
author | Ankit Meel <ankitjmeel@gmail.com> | 2020-11-02 13:41:10 +0300 |
---|---|---|
committer | Ankit Meel <ankitjmeel@gmail.com> | 2020-11-02 13:41:10 +0300 |
commit | f2c7b4a1c54e27bc7df3f51871f8767c9f280f37 (patch) | |
tree | 051f5cf14497e263c599e5a53a7afb71787af5fd | |
parent | 19dec6c8a7ce99079a4850c3e958130ec434705e (diff) |
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.
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ab69048e205..f8fe1a234cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() |