Skip to content

Commit d895b1b

Browse files
committed
MY_FILE
1 parent 0e7b31b commit d895b1b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ endif()
5353

5454
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
5555
set(CMAKE_CXX_EXTENSIONS OFF)
56-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") # inc branch coverage
56+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -DMY_FILE='\"$(notdir $(abspath $<))\"'") # inc branch coverage
5757

5858
add_executable(ut_exe)
5959

src/log/UniBaseLog.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ using namespace std;
1919
using namespace std::chrono;
2020

2121
// ***********************************************************************************************
22-
#define BUF(content) __FILE__ << ":" << __LINE__ << ": " << content << endl // __FILE_NAME__ since GCC 12
22+
#define BUF(content) MY_FILE << ":" << __LINE__ << ": " << content << endl // __FILE_NAME__ since GCC 12
2323
#define DBG(content) { oneLog() << "DBG] " << BUF(content); }
2424
#define INF(content) { oneLog() << "INF] " << BUF(content); }
2525
#define WRN(content) { oneLog() << "WRN] " << BUF(content); }

0 commit comments

Comments
 (0)