From c3969b789e7e3d99552d59608058d0fd033cecc0 Mon Sep 17 00:00:00 2001 From: Sergei Silnov Date: Wed, 25 May 2022 17:56:59 +0200 Subject: [PATCH] build & config: Add IDF_COMPONENT_MANAGER build property --- docs/en/api-guides/build-system.rst | 1 + tools/cmake/build.cmake | 6 +++--- tools/cmake/component.cmake | 5 ++--- tools/cmake/project.cmake | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index 4f1e275149..6b0d9be63d 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -1299,6 +1299,7 @@ These are properties that describe the build. Values of build properties can be - EXECUTABLE - project executable; set by call to ``idf_build_executable`` - EXECUTABLE_NAME - name of project executable without extension; set by call to ``idf_build_executable`` - EXECUTABLE_DIR - path containing the output executable +- IDF_COMPONENT_MANAGER - the component manager is enabled by default, but if this property is set to ``0`` it was disabled by the IDF_COMPONENT_MANAGER environment variable - IDF_PATH - ESP-IDF path; set from IDF_PATH environment variable, if not, inferred from the location of ``idf.cmake`` - IDF_TARGET - target chip for the build; set from the required target argument for ``idf_build_process`` - IDF_VER - ESP-IDF version; set from either a version file or the Git revision of the IDF_PATH repository diff --git a/tools/cmake/build.cmake b/tools/cmake/build.cmake index 52fa13ef56..4e81aa35c3 100644 --- a/tools/cmake/build.cmake +++ b/tools/cmake/build.cmake @@ -141,7 +141,7 @@ function(__build_init idf_path) idf_build_set_property(__PREFIX idf) idf_build_set_property(__CHECK_PYTHON 1) - idf_build_set_property(__ENABLE_COMPONENT_MANAGER 0) + idf_build_set_property(IDF_COMPONENT_MANAGER 0) __build_set_default_build_specifications() @@ -422,8 +422,8 @@ macro(idf_build_process target) endif() # Call for component manager to download dependencies for all components - idf_build_get_property(enable_component_manager __ENABLE_COMPONENT_MANAGER) - if(enable_component_manager) + idf_build_get_property(idf_component_manager IDF_COMPONENT_MANAGER) + if(idf_component_manager EQUAL 1) idf_build_get_property(build_dir BUILD_DIR) set(managed_components_list_file ${build_dir}/managed_components_list.temp.cmake) set(local_components_list_file ${build_dir}/local_components_list.temp.yml) diff --git a/tools/cmake/component.cmake b/tools/cmake/component.cmake index 915f1d32c2..4848d9dd7d 100644 --- a/tools/cmake/component.cmake +++ b/tools/cmake/component.cmake @@ -219,9 +219,8 @@ function(__component_get_requirements) message(FATAL_ERROR "${error}") endif() - idf_build_get_property(enable_component_manager __ENABLE_COMPONENT_MANAGER) - if(enable_component_manager) - # Call for component manager once again to inject dependencies + idf_build_get_property(idf_component_manager IDF_COMPONENT_MANAGER) + if(idf_component_manager EQUAL 1) idf_build_get_property(python PYTHON) execute_process(COMMAND ${python} "-m" diff --git a/tools/cmake/project.cmake b/tools/cmake/project.cmake index 707e3c62ab..b081973fc2 100644 --- a/tools/cmake/project.cmake +++ b/tools/cmake/project.cmake @@ -41,7 +41,7 @@ endif() # Enable the component manager for regular projects if not explicitly disabled. if(NOT "$ENV{IDF_COMPONENT_MANAGER}" EQUAL "0") - idf_build_set_property(__ENABLE_COMPONENT_MANAGER 1) + idf_build_set_property(IDF_COMPONENT_MANAGER 1) endif() #