From 9b876bbc243bb068c0295d5c0cdfa214d7939bfe Mon Sep 17 00:00:00 2001 From: will-v-pi <108662275+will-v-pi@users.noreply.github.com> Date: Wed, 23 Jul 2025 14:51:36 +0100 Subject: [PATCH] Fix location of map file on Ninja (#2584) --- src/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f21db2d8..65b1d8c5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -74,12 +74,11 @@ endfunction() # add map file generation for the given target function(pico_add_map_output TARGET) - pico_get_runtime_output_directory(${TARGET} output_path) get_target_property(target_type ${TARGET} TYPE) if ("EXECUTABLE" STREQUAL "${target_type}") - target_link_options(${TARGET} PRIVATE "LINKER:-Map=${output_path}$>,$,$>${CMAKE_EXECUTABLE_SUFFIX}.map") + target_link_options(${TARGET} PRIVATE "LINKER:-Map=$.map") else () - target_link_options(${TARGET} INTERFACE "LINKER:-Map=${output_path}$>,$,$>${CMAKE_EXECUTABLE_SUFFIX}.map") + target_link_options(${TARGET} INTERFACE "LINKER:-Map=$.map") endif () endfunction()