mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(menuconfig): optimize menuconfig speed
When esp-idf-kconfig >= 3.9.0 is installed, we can use the optimized
menuconfig target without the need to preprocess the sdkconfig file by
kconfgen (removing deprecated options - menuconfig - readding deprecated
options).
Also removed unused {menuconfig_depends} from the new target.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -143,6 +143,32 @@ function(deprecate_variable var)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#[[
|
||||
.. cmakev2:function:: __check_python_package_min_version
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
__check_python_package_min_version(<python_exe> <package_name> <min_version> <result_var>)
|
||||
|
||||
Check whether a Python package is installed with at least the given version
|
||||
via ``importlib.metadata.version``. Sets ``<result_var>`` to TRUE or FALSE
|
||||
in the parent scope.
|
||||
#]]
|
||||
function(__check_python_package_min_version python_exe package_name min_version result_var)
|
||||
execute_process(
|
||||
COMMAND ${python_exe} -c
|
||||
"from importlib.metadata import version; print(version('${package_name}'))"
|
||||
OUTPUT_VARIABLE _ver
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
RESULT_VARIABLE _rc
|
||||
ERROR_QUIET
|
||||
)
|
||||
set(${result_var} FALSE PARENT_SCOPE)
|
||||
if(_rc EQUAL 0 AND _ver VERSION_GREATER_EQUAL "${min_version}")
|
||||
set(${result_var} TRUE PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#[[
|
||||
__get_real_target(TARGET <target>
|
||||
OUTPUT <variable>)
|
||||
|
||||
Reference in New Issue
Block a user