File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ set(FEAT_TIMER ON CACHE BOOL "Timer support")
26
26
set (BUILD_OPT "s" CACHE STRING "Optimization level" )
27
27
set (BUILD_DBG OFF CACHE BOOL "Enable debug symbols" )
28
28
set (BUILD_LTO OFF CACHE BOOL "Enable Link-Time-Optimisations" )
29
+ set (BUILD_RELPATH ON CACHE BOOL "make __FILE__ be relative instead of absolute" )
29
30
30
31
set (USB_PID 0 CACHE STRING "" )
31
32
set (USB_VID 0 CACHE STRING "" )
@@ -46,6 +47,13 @@ ensure_CMSIS(${CMSIS5_PATH} ${AUTODL_CMSIS})
46
47
47
48
add_library (core_config INTERFACE )
48
49
50
+ if (${BUILD_RELPATH} )
51
+ # $<TARGET_PROPERTY:SOURCE_DIR> is evaluated by the final consumer, no core_config
52
+ target_compile_options (core_config INTERFACE
53
+ "-fmacro-prefix-map=$<TARGET_PROPERTY:SOURCE_DIR>=."
54
+ )
55
+ endif ()
56
+
49
57
# configuration specifics
50
58
if (${FEAT_XSERIAL} STREQUAL "GENERIC" )
51
59
target_compile_definitions (core_config INTERFACE
You can’t perform that action at this time.
0 commit comments