cmake: Use variables for target names
There is an effort underway to make most of the Zephyr build script's reentrant. Meaning, the build scripts can be executed multiple times during the same CMake invocation. Reentrancy enables several use-cases, the motivating one is the ability to build several Zephyr executables, or images, for instance a bootloader and an application. For build scripts to be reentrant they cannot be directly referencing global variables, like target names, but must instead reference variables, which can vary from entry to entry. Therefore, in this patch, we replace global targets with variables. Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
parent
1526070082
commit
1b86fb9da3
6 changed files with 49 additions and 36 deletions
|
@ -51,6 +51,6 @@ target_sources_ifdef(
|
|||
)
|
||||
|
||||
|
||||
add_dependencies(kernel offsets_h)
|
||||
add_dependencies(kernel ${OFFSETS_H_TARGET})
|
||||
|
||||
target_link_libraries(kernel zephyr_interface)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue