mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
cmake: expand build components before generating config
!4452 had config generation first before building the component list to be used in the build. This proved to be detrimental when a new target is added as config generation would consider configs from both targets.
This commit is contained in:
parent
767455dbeb
commit
33dd7011be
@ -365,12 +365,6 @@ macro(idf_build_process target)
|
|||||||
# Check for required Python modules
|
# Check for required Python modules
|
||||||
__build_check_python()
|
__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.
|
# Write the partial build properties to a temporary file.
|
||||||
# The path to this generated file is set to a short-lived build
|
# The path to this generated file is set to a short-lived build
|
||||||
# property BUILD_PROPERTIES_FILE.
|
# property BUILD_PROPERTIES_FILE.
|
||||||
@ -416,6 +410,7 @@ macro(idf_build_process target)
|
|||||||
idf_build_unset_property(BUILD_PROPERTIES_FILE)
|
idf_build_unset_property(BUILD_PROPERTIES_FILE)
|
||||||
file(REMOVE ${build_properties_file})
|
file(REMOVE ${build_properties_file})
|
||||||
|
|
||||||
|
|
||||||
# Finally, do component expansion. In this case it simply means getting a final list
|
# 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.
|
# of build component targets given the requirements set by each component.
|
||||||
if(__COMPONENTS)
|
if(__COMPONENTS)
|
||||||
@ -442,6 +437,12 @@ macro(idf_build_process target)
|
|||||||
idf_build_set_property(___COMPONENT_REQUIRES_COMMON ${lib} APPEND)
|
idf_build_set_property(___COMPONENT_REQUIRES_COMMON ${lib} APPEND)
|
||||||
endforeach()
|
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
|
# Temporary trick to support both gcc5 and gcc8 builds
|
||||||
if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL 5.2.0)
|
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")
|
set(GCC_NOT_5_2_0 0 CACHE STRING "GCC is 5.2.0 version")
|
||||||
|
@ -88,14 +88,17 @@ endfunction()
|
|||||||
function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
|
function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
|
||||||
# List all Kconfig and Kconfig.projbuild in known components
|
# List all Kconfig and Kconfig.projbuild in known components
|
||||||
idf_build_get_property(component_targets __COMPONENT_TARGETS)
|
idf_build_get_property(component_targets __COMPONENT_TARGETS)
|
||||||
|
idf_build_get_property(build_component_targets __BUILD_COMPONENT_TARGETS)
|
||||||
foreach(component_target ${component_targets})
|
foreach(component_target ${component_targets})
|
||||||
__component_get_property(kconfig ${component_target} KCONFIG)
|
if(component_target IN_LIST build_component_targets)
|
||||||
__component_get_property(kconfig_projbuild ${component_target} KCONFIG_PROJBUILD)
|
__component_get_property(kconfig ${component_target} KCONFIG)
|
||||||
if(kconfig)
|
__component_get_property(kconfig_projbuild ${component_target} KCONFIG_PROJBUILD)
|
||||||
list(APPEND kconfigs ${kconfig})
|
if(kconfig)
|
||||||
endif()
|
list(APPEND kconfigs ${kconfig})
|
||||||
if(kconfig_projbuild)
|
endif()
|
||||||
list(APPEND kconfig_projbuilds ${kconfig_projbuild})
|
if(kconfig_projbuild)
|
||||||
|
list(APPEND kconfig_projbuilds ${kconfig_projbuild})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user