diff --git a/CMakeLists.txt b/CMakeLists.txt index aad5261a..3b94e79c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,9 @@ if (ADDRESS_SANITIZER) add_compile_options(-fsanitize=address -O1 -fno-omit-frame-pointer -g) set(ASAN_LIB -fsanitize=address) endif() +if (CMAKE_CXX_COMPILER_ID MATCHES Clang|GNU) + add_compile_options(-fmacro-prefix-map=${PROJECT_SOURCE_DIR}=.) +endif() file(GLOB UI_FILES ${CMAKE_AUTOUIC_SEARCH_PATHS}/*.ui) diff --git a/lib/base.h b/lib/base.h index 820cc739..7671d1d0 100644 --- a/lib/base.h +++ b/lib/base.h @@ -26,7 +26,7 @@ #define CCHAR(x) qPrintable(x) -#define C_FILE ((strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') : __FILE__- 1) + 1) +#define C_FILE __FILE__ #define TRACE qDebug("File: %s Func: %s Line: %d", C_FILE, __func__, __LINE__); #define nativeSeparator(s) QDir::toNativeSeparators(s)