Skip to content

Commit 9d70cb2

Browse files
committed
CMake: remove workaround for targets prior refactor
As we refactored all targets, we can remove this workaround from the tree.
1 parent 4c58112 commit 9d70cb2

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

CMakeLists.txt

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -118,26 +118,12 @@ add_subdirectory(features EXCLUDE_FROM_ALL)
118118
add_subdirectory(cmsis/CMSIS_5/CMSIS/RTOS2 EXCLUDE_FROM_ALL)
119119
add_subdirectory(cmsis/device/rtos EXCLUDE_FROM_ALL)
120120

121-
# This is a temporary workaround to prevent the build from failing for MBED_TARGETS that
122-
# haven't been converted to build system targets yet.
123-
# The refactored MBED_TARGETS set the linker script and forward it to the build system as a
124-
# usage requirement. The 'old' mechanism was to set the linker script on the top level mbed-core
125-
# target. This was needed because MBED_TARGETS were not registered as buildsystem targets,
126-
# preventing CMake from working its usage requirements magic and forcing us to set the linker
127-
# script globally.
128-
#
129121
# Ensure the words that make up the Mbed target name are separated with a hyphen, lowercase, and with the `mbed-` prefix.
130122
string(TOLOWER ${MBED_TARGET} MBED_TARGET_CONVERTED)
131123
string(REPLACE "_" "-" MBED_TARGET_CONVERTED ${MBED_TARGET_CONVERTED})
132124
string(PREPEND MBED_TARGET_CONVERTED "mbed-")
133125

134-
# TODO: Remove when all MBED_TARGETS have been converted to build system targets.
135-
if(TARGET ${MBED_TARGET_CONVERTED})
136-
target_link_libraries(mbed-core INTERFACE ${MBED_TARGET_CONVERTED})
137-
else()
138-
get_property(LINKER_SCRIPT GLOBAL PROPERTY MBED_TARGET_LINKER_FILE)
139-
mbed_set_linker_script(mbed-core ${LINKER_SCRIPT})
140-
endif()
126+
target_link_libraries(mbed-core INTERFACE ${MBED_TARGET_CONVERTED})
141127

142128
#
143129
# Configures the application

0 commit comments

Comments
 (0)