Skip to content

Commit

Permalink
[nrf toup] cmake: check BOARD before setting default
Browse files Browse the repository at this point in the history
Wil go upstream when multi image is added upstream.

Currently the BOARD variable is not checked before setting the
default value. This causes issues in a multi image context.

Fix this by checking if the BOARD variable is set before
setting it to its default value.

Signed-off-by: Håkon Øye Amundsen <[email protected]>
  • Loading branch information
hakonfam authored and SebastianBoe committed Apr 8, 2019
1 parent 0341ae4 commit 6168414
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion boot/zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ cmake_minimum_required(VERSION 3.8.2)

# Board-specific CONF_FILES should get merged into the build as well.
# Default to qemu_x86 if no board has been specified.
set(BOARD qemu_x86)
# If BOARD is already defined, mcuboot is being built in a multi image
# context, and should default to its parent image BOARD.
if (NOT BOARD)
set(BOARD qemu_x86)
endif()

# Add a common dts overlay necessary to ensure mcuboot is linked into,
# and fits inside, the boot partition. (If the user specified a
Expand Down

0 comments on commit 6168414

Please sign in to comment.