cmake: Fix bug where dts.overlay was not being appended

Fix bug #399 where dts.overlay was not being appended.

The build scripts were erroneously modifying the shadowed non-cache
variable instead of the cache variable.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2019-04-03 15:14:37 +02:00 committed by David Brown
parent fda937ab02
commit ea49cd0b1a
1 changed files with 6 additions and 2 deletions

View File

@ -16,14 +16,18 @@ set(BOARD qemu_x86)
# the list).
if(DTC_OVERLAY_FILE)
set(DTC_OVERLAY_FILE
"${DTC_OVERLAY_FILE} ${CMAKE_CURRENT_LIST_DIR}/dts.overlay")
"${DTC_OVERLAY_FILE} ${CMAKE_CURRENT_LIST_DIR}/dts.overlay"
CACHE STRING "" FORCE
)
else()
set(DTC_OVERLAY_FILE ${CMAKE_CURRENT_LIST_DIR}/dts.overlay)
endif()
if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}.overlay)
set(DTC_OVERLAY_FILE
"${DTC_OVERLAY_FILE} ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}.overlay")
"${DTC_OVERLAY_FILE} ${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}.overlay"
CACHE STRING "" FORCE
)
endif()
# Enable Zephyr runner options which request mass erase if so