cmake: Kconfig: Minor refactorings in preparation for solving #5634

Minor refactoring of the build scripts in preparation for the patch
that resolves #5634.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2019-02-20 17:42:09 +01:00 committed by Carles Cufí
commit cabb35fcc9

View file

@ -13,7 +13,7 @@ else()
endif()
set(BOARD_DEFCONFIG ${BOARD_DIR}/${BOARD}_defconfig)
set(DOTCONFIG ${PROJECT_BINARY_DIR}/.config)
set(DOTCONFIG ${PROJECT_BINARY_DIR}/.config)
if(CONF_FILE)
string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE}")
@ -170,8 +170,11 @@ if(NOT "${ret}" STREQUAL "0")
endif()
# Force CMAKE configure when the configuration files changes.
foreach(merge_config_input ${merge_config_files} ${DOTCONFIG})
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${merge_config_input})
foreach(kconfig_input
${merge_config_files}
${DOTCONFIG}
)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${kconfig_input})
endforeach()
add_custom_target(config-sanitycheck DEPENDS ${DOTCONFIG})