Skip to content

Commit 1b19aaa

Browse files
committed
only enable macro prefix outside of debug builds
1 parent 03b835b commit 1b19aaa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cmake/macro_prefix.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
include(${CMAKE_SOURCE_DIR}/cmake/misc.cmake)
22

33
function (set_macro_prefix project_name acc)
4+
if (NOT ENABLE_MACRO_PREFIX)
5+
return()
6+
endif ()
47
if (ENABLE_COVERAGE)
58
return()
69
endif ()

cmake/options.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ set(CACHE_PROGRAM "ccache" CACHE STRING "Compiler cache to be used")
5252

5353
# Macro prefix
5454

55-
set(MACRO_PREFIX "" CACHE STRING "Make __FILE__ macro relative to particular directory")
55+
option(ENABLE_MACRO_PREFIX "Enable __FILE__ macro replacement" ${IS_NOT_DEBUG})
56+
set(MACRO_PREFIX "./" CACHE STRING "Make __FILE__ macro relative to particular directory")
5657

5758
# Language standard and extensions
5859
set(CMAKE_CXX_STANDARD 20)

0 commit comments

Comments
 (0)