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 <Marcin.Szymczyk@nordicsemi.no>
This commit is contained in:
Marcin Szymczyk 2019-04-03 11:15:38 +02:00 committed by Kumar Gala
commit fa0083ad0e

View file

@ -291,6 +291,7 @@ foreach(root ${BOARD_ROOT})
if(DEFINED SHIELD)
foreach(s ${SHIELD_AS_LIST})
list(REMOVE_ITEM SHIELD ${s})
list(FIND SHIELD_LIST ${s} _idx)
if (NOT _idx EQUAL -1)
list(GET shields_refs_list ${_idx} s_path)