diff --git a/CMakeLists.txt b/CMakeLists.txt index 97ccaf16af0..270e5d28f42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,11 +46,7 @@ else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") endif() -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") -else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") -endif() +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv7l") set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -latomic") diff --git a/lib/chunkio/CMakeLists.txt b/lib/chunkio/CMakeLists.txt index bbe1f39cb75..809ea93037c 100644 --- a/lib/chunkio/CMakeLists.txt +++ b/lib/chunkio/CMakeLists.txt @@ -14,12 +14,7 @@ else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall ") endif() -# Set __FILENAME__ -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") -else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") -endif() +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") include(cmake/macros.cmake) diff --git a/lib/cmetrics/CMakeLists.txt b/lib/cmetrics/CMakeLists.txt index 60e8774bbd4..e3d614946c0 100644 --- a/lib/cmetrics/CMakeLists.txt +++ b/lib/cmetrics/CMakeLists.txt @@ -34,12 +34,7 @@ set(CMT_VERSION_MINOR 3) set(CMT_VERSION_PATCH 5) set(CMT_VERSION_STR "${CMT_VERSION_MAJOR}.${CMT_VERSION_MINOR}.${CMT_VERSION_PATCH}") -# Define __FILENAME__ consistently across Operating Systems -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") -else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") -endif() +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") # Configuration options option(CMT_DEV "Enable development mode" No)