Skip to content

Commit 68ce1b2

Browse files
Fix CMake dependency error with custom linker scripts
1 parent 15ab0c3 commit 68ce1b2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/cmake/mbed_set_linker_script.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ endfunction(mbed_setup_linker_script)
115115
function(mbed_set_custom_linker_script target new_linker_script_path)
116116

117117
set(RAW_LINKER_SCRIPT_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/${new_linker_script_path})
118-
set(CUSTOM_LINKER_SCRIPT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${target}.link_spript.ld)
118+
set(CUSTOM_LINKER_SCRIPT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${target}.link_script.ld)
119119

120120
# To avoid path limits on Windows, we create a "response file" and set the path to it as a
121121
# global property. We need this solely to pass the compile definitions to GCC's preprocessor,
@@ -151,6 +151,5 @@ function(mbed_set_custom_linker_script target new_linker_script_path)
151151
PRIVATE
152152
"-T" "${CUSTOM_LINKER_SCRIPT_PATH}"
153153
)
154-
set_property(TARGET ${target} APPEND PROPERTY LINK_DEPENDS ${CUSTOM_LINKER_SCRIPT_PATH})
155154

156155
endfunction(mbed_set_custom_linker_script)

0 commit comments

Comments
 (0)