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. |
---|
|
CMakeLists.txt |
---|
tools/cmake/mbed_greentea.cmake |
---|
tools/cmake/set_linker_script.cmake 0 → 100644 |
---|