diff --git a/tools/cmake/kconfig.cmake b/tools/cmake/kconfig.cmake index af9f02ea57..b625cc4a87 100644 --- a/tools/cmake/kconfig.cmake +++ b/tools/cmake/kconfig.cmake @@ -281,6 +281,9 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults) endif() # Generate the menuconfig target + # WARNING: If you change anything here, please ensure that only the necessary files are touched! + # If unnecessary files (those not affected by the change from menuconfig) are touched + # (their timestamp changed), it will cause unnecessary rebuilds of the whole project! add_custom_target(menuconfig ${menuconfig_depends} # create any missing config file, with defaults if necessary @@ -291,7 +294,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults) --env "IDF_ENV_FPGA=${idf_env_fpga}" --env "IDF_INIT_VERSION=${idf_init_version}" --dont-write-deprecated - ${kconfgen_output_options} + --output config ${sdkconfig} # Do NOT regenerate the rest of the config files! COMMAND ${TERM_CHECK_CMD} COMMAND ${CMAKE_COMMAND} -E env "COMPONENT_KCONFIGS_SOURCE_FILE=${kconfigs_path}" @@ -304,8 +307,8 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults) "IDF_MINIMAL_BUILD=${idf_minimal_build}" ${MENUCONFIG_CMD} ${root_kconfig} USES_TERMINAL - # additional run of kconfgen esures that the deprecated options will be inserted into sdkconfig (for backward - # compatibility) + # additional run of kconfgen ensures that the deprecated options will be inserted into config files + # (for backward compatibility) COMMAND ${kconfgen_basecommand} --env "IDF_TARGET=${idf_target}" --env "IDF_TOOLCHAIN=${idf_toolchain}"