mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
fix(build): ensure the main component exists when MINIMAL_BUILD is enabled
The minimal build property is simply a shorthand for `set(COMPONENTS main)`. The issue is that there is currently no check to verify whether the `main` component actually exists or is known to the build system. If the `main` component is not present, print an error message along with suggestions on how to fix this inconsistency. Closes https://github.com/espressif/esp-idf/issues/18219 Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
@@ -264,6 +264,9 @@ The build system provides special treatment to the ``main`` component. It is a c
|
||||
2. Set ``EXTRA_COMPONENT_DIRS`` in the project CMakeLists.txt to include the renamed ``main`` directory.
|
||||
3. Specify the dependencies in the renamed component's CMakeLists.txt file via REQUIRES or PRIV_REQUIRES arguments :ref:`on component registration <cmake_minimal_component_cmakelists>`.
|
||||
|
||||
.. note::
|
||||
|
||||
A project without a ``main`` component cannot use the ``MINIMAL_BUILD`` :ref:`build property <cmake-build-properties>`, as this property explicitly relies on the presence of the ``main`` component. Ensure that the ``MINIMAL_BUILD`` build property is not set for projects that do not include a ``main`` component.
|
||||
|
||||
Overriding Default Build Specifications
|
||||
---------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user