cmake: extensions: Do not clear variable in zephyr_get MERGE mode
Fixes a regression whereby the variable would be cleared prior to being used in MERGE mode. Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
ca7a66d787
commit
87f50bb72b
1 changed files with 4 additions and 1 deletions
|
@ -2508,7 +2508,9 @@ function(zephyr_get variable)
|
|||
endif()
|
||||
|
||||
if(GET_VAR_MERGE)
|
||||
# Clear variable before appending items in MERGE mode
|
||||
# Clear variable before appending items in MERGE mode but keep a backup for
|
||||
# local appending later
|
||||
set(local_var_backup ${${variable}})
|
||||
set(${variable})
|
||||
endif()
|
||||
|
||||
|
@ -2574,6 +2576,7 @@ function(zephyr_get variable)
|
|||
endif()
|
||||
|
||||
if(GET_VAR_MERGE)
|
||||
list(APPEND ${variable} ${local_var_backup})
|
||||
list(REMOVE_DUPLICATES ${variable})
|
||||
set(${variable} ${${variable}} PARENT_SCOPE)
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue