diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f21db2d80..65b1d8c5f 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()