File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 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")
2626set (BUILD_OPT "s" CACHE STRING "Optimization level" )
2727set (BUILD_DBG OFF CACHE BOOL "Enable debug symbols" )
2828set (BUILD_LTO OFF CACHE BOOL "Enable Link-Time-Optimisations" )
29+ set (BUILD_RELPATH ON CACHE BOOL "make __FILE__ be relative instead of absolute" )
2930
3031set (USB_PID 0 CACHE STRING "" )
3132set (USB_VID 0 CACHE STRING "" )
@@ -46,6 +47,13 @@ ensure_CMSIS(${CMSIS5_PATH} ${AUTODL_CMSIS})
4647
4748add_library (core_config INTERFACE )
4849
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+
4957# configuration specifics
5058if (${FEAT_XSERIAL} STREQUAL "GENERIC" )
5159 target_compile_definitions (core_config INTERFACE
You can’t perform that action at this time.
0 commit comments