Skip to content

Commit fa0083a

Browse files
masz-nordicgalak
authored andcommitted
cmake: fix support for out of tree shields
After the rework in #12403, specifying a shield which has overlay out of the tree causes unnecessary inclusions of overlays. For every board root, overlays that have same index as expected overlay are being included. Fix this by removing already included overlays from SHIELD list. Signed-off-by: Marcin Szymczyk <[email protected]>
1 parent a000ba7 commit fa0083a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/app/boilerplate.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ foreach(root ${BOARD_ROOT})
291291

292292
if(DEFINED SHIELD)
293293
foreach(s ${SHIELD_AS_LIST})
294+
list(REMOVE_ITEM SHIELD ${s})
294295
list(FIND SHIELD_LIST ${s} _idx)
295296
if (NOT _idx EQUAL -1)
296297
list(GET shields_refs_list ${_idx} s_path)

0 commit comments

Comments
 (0)