cmake: Refactor mbed_set_mbed_target_linker_script
Move the mbed_set_mbed_target_linker_script function into its own file
and make it set the linkerscript on the target passed in, rather than
setting the linkerscript on the top level mbed-core target. We use
CMake's automatic forwarding of usage requirements to forward the linker
script to the top level target.

This commit also adds a condition to check whether the MBED_TARGET is a
CMake buildsystem target. If it is we will just link to it in the
idiomatic CMake way, if it's not then we use the 'old' mechanism of
setting the linkerscript for the mbed-core target. This check will be
useful when we refactor MBED_TARGETS to be CMake buildsystem targets as
it will allow us to do the refactoring incrementally.
ls
1 parent 8f47212 commit 0e491cc0cfe3499ed7aea3e59c7933b2310aaaa2
@Robert Walton Robert Walton authored on 27 Jan 2021
Jaeden Amero committed on 4 Feb 2021
Showing 3 changed files
View
CMakeLists.txt
View
tools/cmake/mbed_greentea.cmake
View
tools/cmake/set_linker_script.cmake 0 → 100644