kopia lustrzana https://github.com/espressif/esp-idf
cmake: sort lists obtained from file(GLOB)
CMake sorts result of file(GLOB) command since version 3.6.0: https://gitlab.kitware.com/cmake/cmake/-/commit/edcccde7d Since ESP-IDF sets cmake_minimum_required version to 3.5, and version 3.5.1 is used in CI, sort file lists obtained from file(GLOB) manually. This helps obtain reproducible order of libraries passed to the linker and to ldgen.pull/6951/merge
rodzic
a9db7831b0
commit
2f811b7975
|
@ -146,6 +146,7 @@ function(__build_init idf_path)
|
||||||
idf_build_get_property(idf_path IDF_PATH)
|
idf_build_get_property(idf_path IDF_PATH)
|
||||||
idf_build_get_property(prefix __PREFIX)
|
idf_build_get_property(prefix __PREFIX)
|
||||||
file(GLOB component_dirs ${idf_path}/components/*)
|
file(GLOB component_dirs ${idf_path}/components/*)
|
||||||
|
list(SORT component_dirs)
|
||||||
foreach(component_dir ${component_dirs})
|
foreach(component_dir ${component_dirs})
|
||||||
get_filename_component(component_dir ${component_dir} ABSOLUTE)
|
get_filename_component(component_dir ${component_dir} ABSOLUTE)
|
||||||
__component_dir_quick_check(is_component ${component_dir})
|
__component_dir_quick_check(is_component ${component_dir})
|
||||||
|
|
|
@ -275,6 +275,7 @@ macro(__component_add_sources sources)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB dir_sources "${abs_dir}/*.c" "${abs_dir}/*.cpp" "${abs_dir}/*.S")
|
file(GLOB dir_sources "${abs_dir}/*.c" "${abs_dir}/*.cpp" "${abs_dir}/*.S")
|
||||||
|
list(SORT dir_sources)
|
||||||
|
|
||||||
if(dir_sources)
|
if(dir_sources)
|
||||||
foreach(src ${dir_sources})
|
foreach(src ${dir_sources})
|
||||||
|
|
|
@ -102,10 +102,13 @@ endfunction()
|
||||||
function(__kconfig_component_init component_target)
|
function(__kconfig_component_init component_target)
|
||||||
__component_get_property(component_dir ${component_target} COMPONENT_DIR)
|
__component_get_property(component_dir ${component_target} COMPONENT_DIR)
|
||||||
file(GLOB kconfig "${component_dir}/Kconfig")
|
file(GLOB kconfig "${component_dir}/Kconfig")
|
||||||
|
list(SORT kconfig)
|
||||||
__component_set_property(${component_target} KCONFIG "${kconfig}")
|
__component_set_property(${component_target} KCONFIG "${kconfig}")
|
||||||
file(GLOB kconfig "${component_dir}/Kconfig.projbuild")
|
file(GLOB kconfig "${component_dir}/Kconfig.projbuild")
|
||||||
|
list(SORT kconfig)
|
||||||
__component_set_property(${component_target} KCONFIG_PROJBUILD "${kconfig}")
|
__component_set_property(${component_target} KCONFIG_PROJBUILD "${kconfig}")
|
||||||
file(GLOB sdkconfig_rename "${component_dir}/sdkconfig.rename")
|
file(GLOB sdkconfig_rename "${component_dir}/sdkconfig.rename")
|
||||||
|
list(SORT sdkconfig_rename)
|
||||||
__component_set_property(${component_target} SDKCONFIG_RENAME "${sdkconfig_rename}")
|
__component_set_property(${component_target} SDKCONFIG_RENAME "${sdkconfig_rename}")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue