# Check for required Python modules
__build_check_python()
- # Generate config values in different formats
- idf_build_get_property(sdkconfig SDKCONFIG)
- idf_build_get_property(sdkconfig_defaults SDKCONFIG_DEFAULTS)
- __kconfig_generate_config("${sdkconfig}" "${sdkconfig_defaults}")
- __build_import_configs()
-
# Write the partial build properties to a temporary file.
# The path to this generated file is set to a short-lived build
# property BUILD_PROPERTIES_FILE.
idf_build_unset_property(BUILD_PROPERTIES_FILE)
file(REMOVE ${build_properties_file})
+
# Finally, do component expansion. In this case it simply means getting a final list
# of build component targets given the requirements set by each component.
if(__COMPONENTS)
idf_build_set_property(___COMPONENT_REQUIRES_COMMON ${lib} APPEND)
endforeach()
+ # Generate config values in different formats
+ idf_build_get_property(sdkconfig SDKCONFIG)
+ idf_build_get_property(sdkconfig_defaults SDKCONFIG_DEFAULTS)
+ __kconfig_generate_config("${sdkconfig}" "${sdkconfig_defaults}")
+ __build_import_configs()
+
# Temporary trick to support both gcc5 and gcc8 builds
if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL 5.2.0)
set(GCC_NOT_5_2_0 0 CACHE STRING "GCC is 5.2.0 version")
function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
# List all Kconfig and Kconfig.projbuild in known components
idf_build_get_property(component_targets __COMPONENT_TARGETS)
+ idf_build_get_property(build_component_targets __BUILD_COMPONENT_TARGETS)
foreach(component_target ${component_targets})
- __component_get_property(kconfig ${component_target} KCONFIG)
- __component_get_property(kconfig_projbuild ${component_target} KCONFIG_PROJBUILD)
- if(kconfig)
- list(APPEND kconfigs ${kconfig})
- endif()
- if(kconfig_projbuild)
- list(APPEND kconfig_projbuilds ${kconfig_projbuild})
+ if(component_target IN_LIST build_component_targets)
+ __component_get_property(kconfig ${component_target} KCONFIG)
+ __component_get_property(kconfig_projbuild ${component_target} KCONFIG_PROJBUILD)
+ if(kconfig)
+ list(APPEND kconfigs ${kconfig})
+ endif()
+ if(kconfig_projbuild)
+ list(APPEND kconfig_projbuilds ${kconfig_projbuild})
+ endif()
endif()
endforeach()