Skip to content

Commit

Permalink
fixup! cmake: add ExternalNcsVariantProject_Add() function
Browse files Browse the repository at this point in the history
  • Loading branch information
tejlmand committed Oct 24, 2023
1 parent 9fdd7fe commit e0a22f6
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions cmake/sysbuild/modules/ncs_sysbuild_extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,8 @@ function(ExternalNcsVariantProject_Add)
endforeach()

ExternalProject_Get_Property(${VBUILD_VARIANT} BINARY_DIR)
ExternalProject_Add_Step(${VBUILD_VARIANT} variant_config
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${${VBUILD_APPLICATION}_BINARY_DIR}/zephyr/.config
${BINARY_DIR}/zephyr/.config
DEPENDERS build
ALWAYS True
)

# Disable menuconfig and friends in variant builds by substitution with a
# dummy target that does nothing except returning successfully.
set_property(TARGET ${VBUILD_VARIANT} APPEND PROPERTY _EP_CMAKE_ARGS
-DKCONFIG_TARGETS=variant_config
"-DEXTRA_KCONFIG_TARGET_COMMAND_FOR_variant_config=-c\;''"
-DCONFIG_NCS_IS_VARIANT_IMAGE=y
-DPRELOAD_BINARY_DIR=${${VBUILD_APPLICATION}_BINARY_DIR}
)
endfunction()

0 comments on commit e0a22f6

Please sign in to comment.