Commit Graph

7151 Commits

Author SHA1 Message Date
Frantisek Hrbata
d5fcecbe85 ci(pre-commit): exclude buildv2_test_app from check-readmes
The `tools/test_build_system/buildv2_test_app` is a cmakev2 build system
testing application, same as `build_test_app`, which should be removed
from the readme check performed by check_build_test_rules.py.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-05 12:02:08 +01:00
Frantisek Hrbata
dd5aae9c56 feat(cmakev2/project): add warning for usage of deprecated variables
The COMPONENTS and EXCLUDE_COMPONENTS variables are unused in cmakev2. A
deprecation warning will be printed if they are set. This change also
includes a helper functions for printing deprecation warnings.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-05 11:23:03 +01:00
Frantisek Hrbata
5724a6e1e4 fix(cmakev2/project): drop prefix_map_gdbinit in favor of gdbinit/prefix_map
The cmakev1 dropped generation of prefix_map_gdbinit, reflect this
change also in cmakev2.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-05 11:23:03 +01:00
Frantisek Hrbata
a384cde5ae fix(cmakev2/project): bump C and CXX standard
The cmakev1 bumped C and CXX standard to gnu23 and gnu++26, do the same
in cmakev2.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-05 11:23:03 +01:00
Frantisek Hrbata
33e7824e33 fix(cmakev2/compat): add esp_stdio to common requires
The cmakev1 added esp_stdio to common requires, add it in cmakev2 too
for backward compatibility.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-05 11:23:03 +01:00
morris
11c39ccf4b Merge branch 'feat/p4_eco5_target_test_v6.0' into 'release/v6.0'
esp32p4: temporarily disable target test (v6.0)

See merge request espressif/esp-idf!43026
2025-11-05 11:13:26 +08:00
Roland Dobai
36d7618208 Merge branch 'feat/cmakev2_v6.0' into 'release/v6.0'
feat(cmakev2): introduce cmake-based build system v2 (v6.0)

See merge request espressif/esp-idf!43078
2025-11-04 18:02:10 +01:00
Marek Fiala
4591a6f29b Revert "fix: Updated locale handling to prevent issues with build tools"
This reverts commit 7e09b471ab.
2025-11-04 09:20:51 +01:00
Frantisek Hrbata
48b1594238 feat(toolchain): more remove_duplicated_flags function to separate file
Currently, the toolchain CMake files use the remove_duplicated_flags
function from utilities.cmake. The cmakev2 implementation also includes
this function for backward compatibility. Move the
remove_duplicated_flags function to a separate file,
deduplicate_flags.cmake, so it can be shared between cmakev1 and
cmakev2.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:49:45 +01:00
Frantisek Hrbata
07a7581187 feat(cmakev2/compat): add idf_component_register to the API
Using idf_component_register is the preferred method for creating new
components for cmakev2. This approach ensures compatibility with both
versions of the build system. The KCONFIG and KCONFIG_PROJBUILD options
have been removed from the API documentation, but are retained in code
in case a cmakev1 component uses these options to warn about
incompatibility. Also remove a note about `project_include.cmake`,
because cmakev2 includes all project_include files.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
832128e864 fix(cmakev2/component): set the cmakev2 component archive name
Currently, the archive file name is set only in the cmakev1
idf_component_register shim. The predictable component archive file name
is important, for example, for usage in linker fragments. Ensure that
the cmakev2 component also has the archive file name set.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
6f516845fc fix(cmakev2/component): fix setting SOURCES for cmakev2 components
Currently, when the cmakev2 component sources are set, the SRCS target
property is used.  This is obviously wrong because the correct CMake
property is SOURCES.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
e6b1c5857b feat(cmakev2/build): rename LINKER_SCRIPTS_STATIC to LINKER_SCRIPTS
Rename the LINKER_SCRIPTS_STATIC component property to LINKER_SCRIPTS.
This property stores linker scripts that are not processed by ldgen,
which essentially includes all of them. The only linker script processed
by ldgen is sections.ld, which is handled by the esp_system component.
This implies that there is likely no practical use case for other
components to utilize ldgen processed linker scripts. This change is
purely cosmetic to allow components to add linker scripts with:

idf_component_set_property(${COMPONENT_TARGET} LINKER_SCRIPTS linker_script.ld APPEND)

instead of

idf_component_set_property(${COMPONENT_TARGET} LINKER_SCRIPTS_STATIC linker_script.ld APPEND)

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
65052dfbdd fix(cmakev2/docs): keep only the very basic functions in API
Currently, we include numerous functions in the automatically generated
documentation for the build system API. Let's begin with only the
essential functions and gradually add more to the API based on requests
and actual needs.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Sudeep Mohanty
e6c46258dd fix(cmakev2): Add workaround in idf_build_component for duplicate managed component
This commit adds a workaround in idf_build_component shim to avoid
initialization of a duplicate managed component. The component manager
when running on a Windows system returns duplicate managed components
upon successive invocations.
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
72e96e4907 fix(cmakev2/component): fix component library link with whole archive
The current approach involves wrapping the library target within the
library interface target with the whole-archive flags, such as for the
GCC linker. However, this does not work as expected because the library
target is expanded, and the whole-archive flags are also applied to
other library targets that the wrapped library target depends on. IOW
the whole-archive flags surround multiple archives, not just the one
requrested.  Generally, using linker flags like whole-archive in the
library INTERFACE(INTERFACE_LINK_LIBRARIES) does not seem to work as
CMake may perform deduplication and rearrange the flags [1].

The proof of concept used `CMAKE_LINK_LIBRARY_USING_<FEATURE>` with the
WHOLE_ARCHIVE feature, which was introduced in CMake 3.24 to specify how
the library target should be linked. There are two issues with this.
First, this feature is only available from CMake 3.24 onwards, while our
minimum CMake version is set to 3.22. More importantly, all occurrences
of a library on the link line are wrapped.  For example, if a library
like `vfs` appears multiple times on the link line due to dependencies,
each occurrence will be wrapped with whole-archive, causing the linker
to complain about multiple symbol definitions. Therefore, even though
WHOLE_ARCHIVE is recommended for handling whole-archive linkage, it does
not seem suitable for our purposes. This was overlooked in the PoC
because only a simple testing component was used to check the
WHOLE_ARCHIVE behavior.

One way to address this issue is to adopt the same approach used in
cmakev1, which involves specifying the whole-archive flags when linking
component library targets to the final executable. In this case, CMake
retains the flags without any alteration, unlike when the flags are
specified in INTERFACE_LINK_LIBRARIES for the component interface
targets. While this approach is feasible, it would alter the current
logic, where we have a single library interface for the entire idf
library that can be linked to the executable. This change would also
complicate the direct use of the idf library, as it would no longer be
possible to simply link it to the executable. Instead, the executable
would need to correctly link the component libraries with the
whole-archive flags. We could encapsulate this process within the
idf_build_executable function, but projects that only use
idf_build_library would need to implement the same solution.

It appears possible to address this issue by using target_link_options
instead. This allows to specify exactly what should appear on the link
command line. One side effect of this approach is that the library
appears on the link command line multiple times: first when used with
target_link_options and second when used in target_link_libraries.
However, this does not seem to pose a problem. The flags specified with
target_link_options appear on the command line first, ensuring that the
whole-archive is prioritized, and the component archive libraries may be
repeated on the link line anyway due to dependencies. Essentially, the
final link command line is very similar to the one from cmakev1. We may
revisit this approach in the future, but for now, it seems to work as
expected.

[1] https://gitlab.kitware.com/cmake/cmake/-/issues/20078
[2] https://cmake.org/cmake/help/latest/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.html
[3] https://discourse.cmake.org/t/automatically-wrapping-a-static-library-
    in-whole-archive-no-whole-archive-when-used-during-linking/5883

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
c2e54b259c fix(cmakev2/component): sanitize PATHS argument before calling __get_relative_paths
Currently, when the cmakev1 properties for INCLUDE_DIRS and
PRIV_INCLUDE_DIRS are constructed in the
__set_component_cmakev1_properties function, the return values from the
get_target_property function for INCLUDE_DIRECTORIES and
INTERFACE_INCLUDE_DIRECTORIES properties are not checked. If a component
target does not set e.g. INCLUDE_DIRECTORIES property,
get_target_property will return a value such as `include_dirs-NOTFOUND`.
This value is subsequently passed to __get_relative_paths in the PATHS
argument, causing the file(RELATIVE_PATH) call in __get_relative_paths
to fail with an error.

```
CMake Error at /home/fhrbata/work/esp-idf/tools/cmakev2/utilities.cmake:235 (file):
  file RELATIVE_PATH must be passed a full path to the file:
  include_dirs-NOTFOUND
```

Fix this by explicitly set the PATHS to an empty list before passing it
to the __get_relative_paths function if the property is not set.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Sudeep Mohanty
514a27073d feat(cmakev2): Enabled test_cmake.py for cmakev2 in CI 2025-11-04 07:48:15 +01:00
Sudeep Mohanty
419ff4568b feat(cmakev2): ruff formatting changes for test_cmake.py 2025-11-04 07:48:15 +01:00
Sudeep Mohanty
c3881a0631 feat(cmakev2): Create executable dummy source only if it does not exist
idf_build_executable() creates a dummy source file to create the
executable target. Since this file is created unconditionally everytime
CMake configuration happens, a source file change is registered which
causes CMake to execute other targets even though no other source file
changed.
2025-11-04 07:48:15 +01:00
Sudeep Mohanty
859bcacd29 feat(cmakev2): Enabled all component manager tests for cmakev2 2025-11-04 07:48:15 +01:00
Peter Dragun
2c9b71b36e fix: Update esptool commands to use new syntax 2025-11-04 07:48:15 +01:00
Frantisek Hrbata
e56168dbb5 fix(test_build_system): disable tests related to outside component dependencies
The commit adb2d5deee ("feat(cmake): Produce warnings when component dependen..")
introduced additional checks for source files and include directories
used by a component that are located outside the component's directory.
If these files and directories belong to another component, a warning is
issued. This feature has not yet been implemented in cmakev2, so related
tests are temporary disabled.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Sudeep Mohanty
53fd83b7f6 feat(cmakev2): Enable test_components.py for cmakev2 in CI 2025-11-04 07:48:15 +01:00
Sudeep Mohanty
99e8cbda6d feat(cmakev2): ruff formatting changes for test_components.py 2025-11-04 07:48:15 +01:00
Sudeep Mohanty
3679e1a216 feat(cmakev2): Store COMPONENT_OVERRIDEN_DIR property for components 2025-11-04 07:48:15 +01:00
Sudeep Mohanty
71a1029035 feat(cmakev2): Enabled test_common.py for cmakev2 2025-11-04 07:48:15 +01:00
Sudeep Mohanty
8e7cb6014e feat(cmakev2): Rename buildv2_test_app source file
This commit renames the buildv2_test_app.c file to build_test_app.c in
the buildv2_test_app template to enable tests to refer to the same
source file name when writing tests for both cmakev1 and cmakev2.
2025-11-04 07:48:15 +01:00
Sudeep Mohanty
7849a73abe feat(cmakev2): Enabled test_versions.py for cmakev2 2025-11-04 07:48:15 +01:00
Sudeep Mohanty
caf8eb3c2f feat(cmakev2): ruff formatting changes for test_versions.py 2025-11-04 07:48:15 +01:00
Frantisek Hrbata
25d1ceb9c7 feat(cmakev2/component): add __set_component_cmakev1_properties function
In cmakev1, certain arguments provided to the idf_component_register
function are stored as component properties. These properties are used
to generate the project_description.json file, which other tools rely
on. Since the idf_component_register function is obsolete in cmakev2, we
need to recreate component properties such as INCLUDE_DIRS,
PRIV_INCLUDE_DIRS, REQUIRES, and PRIV_REQUIRES, which were previously
provided by the idf_component_register function in cmakev1.  To achieve
this, let's examine the component's real target cmake properties and
reconstruct them to maintain compatibility with cmakev1.

The real target cmake properties may include generator expressions,
which are ignored. This should be acceptable, as they were not addressed
in cmakev1 either, and handling them is likely not feasible.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
4e85b3f5a5 feat(cmakev2/utilities): add __list_difference function
Return the difference between two lists, meaning the elements that are
present in the first list but not in the second.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
6b2b630d90 feat(cmakev2/utilities): add __list_intersection function
Return the intersection of elements in the two lists.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
2e82aa7017 feat(cmakev2/utilities): add __remove_genex function
This helper function removes entries containing generator expressions
from the given list. The list is modified in place.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
579b591f36 feat(cmakev2/utilities): add __get_relative_paths function
This is a helper function that returns a list of paths relative to a
given base directory for a list of input paths.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
1360674f89 feat(cmakev2/build): preprocess linker scripts with the C preprocessor
When a linker script file with a .in extension is added using the
target_linker_script function, it is processed with the C preprocessor.
The linker scripts are preprocessed only once, even if they are used in
multiple libraries, because they are the same.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
2ee43966b7 feat(cmakev2/utilities): add __preprocess_linker_script function
Add a helper function to enable C preprocessing of linker script files.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
6aa25ff65e feat(cmakev2/component): add COMPONENT_BUILD_DIR component property
During the initialization of a component in the __init_component
function, add the COMPONENT_BUILD_DIR property. This can be used to
store component-specific generated files, such as preprocessed linker
scripts.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:15 +01:00
Frantisek Hrbata
041756d274 fix(cmakev2/compat): newlib renamed to esp_libc
The component has been renamed, update the name in the common
requirements for the cmakev1 components.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
1afc554e6c feat(cmakev2/build): introduce component interface cache
The component can be referenced by multiple identifiers such as the
component name, which is derived from the component directory name,
component target, interface, or aliases. All component properties are
attached to the component interface target, which is also used for
declaring component dependencies. The cmakev2 build system has a
function called __get_component_interface, which is responsible for
identifying the component interface based on the given component
identifier. Since this function is called frequently, it needs to be
reasonably fast.

This introduces a new __idf_component_interface_cache INTERFACE target,
which serves as a mapping cache between component identifiers and the
component interface. The cache for each component is initialized in the
__init_component function, which introduces a component to the build
system. Currently, the component interface search is conducted by
examining the COMPONENTS_DISCOVERED and COMPONENT_INTERFACES lists
stored as build properties. Since the build system is aware of most
component identifiers, such as component name, target, and alias, during
component initialization, it can add mappings between component
identifiers and the component interface to a cache, which is built as
the components are initialized. This cache is used in the
__get_component_interface function instead of looking into the
COMPONENTS_DISCOVERED or COMPONENT_INTERFACES lists. This significantly
speeds up the component interface search and also makes the code much
simpler and more readable.

The component interface cache also completely replaces the existing
component name resolution, which was introduced because of the component
manager, and the cache used for resolved component names. This is
possible because all the necessary information is available during
component initialization when the component interface cache is
populated. The ambiguity of components is resolved based on component
source/priority.

Here is an example of the component interface mapping for the
espressif__led_strip component to the idf_espressif__led_strip interface
target. The component name, without the namespace, is referred to as the
short name. In this example, it is led_strip.

- espressif__led_strip -> idf_espressif__led_strip      # name(directory name)
- idf_espressif__led_strip -> idf_espressif__led_strip  # interface
- idf::espressif__led_strip -> idf_espressif__led_strip # alias
- _idf_espressif__led_strip -> idf_espressif__led_strip # real target
- led_strip -> idf_espressif__led_strip                 # short name

When another component with the same espressif__led_strip name is
initialized with a different priority, there is no need to change
anything in the cache, because the mapping stays the same.

The cache must be updated when two components share the same short name
but belong to different namespaces. This situation is likely uncommon.
For instance, consider espressif__led_strip and my__led_strip. If
my__led_strip has a higher priority, the cache is updated to reflect the
short name as follows:

- led_strip -> idf_my__led_strip

If both components have the same priority, the short name mapping for
led_strip is entirely removed. Conversely, if my__led_strip has a lower
priority, no short name mapping is added for it.

The short name is also added to the COMPONENT_SHORT_NAME property of the
component.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
aa6f4e076a feat(cmakev2/kconfig): add idf_create_confserver function
This is a revised version of the existing __create_confserver_target
function. It creates a specified confserver target for a given
executable. The kconfig_menus.json file, used by the IDEs, is generated
when the confserver starts. This differs from the previous behavior,
where kconfig_menus.json was created globally along with other sdkconfig
formats. The reason for this change is that kconfig_menus.json contains
the Kconfig menu hierarchy and it is not just a flat option-value
format. It needs to accurately reflect which configurations for which
components are included or excluded. The kconfig_menus.json is generated
at `build/kconfig_menus.json`, where IDEs expect it. This means the file
is overwritten every time the server starts by kconfig_menus.json
version for given executable, so only one confserver can run at a time.

This is likely acceptable, as I don't believe it's possible to safely
run multiple instances of confserver due to the potential race
conditions when the sdkconfig file are generated.

In the future, we may include the location of kconfig_menus.json in
project_description.json so it can be easily identified by IDEs for
each executable.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
f382edf40d fix(cmakev2/kconfig): do not automatically generate the kconfig_menus.json file
Currently, when the initial sdkconfig is generated, the
kconfig_menus.json format is also created alongside other formats like
CMake, JSON, or C header. The kconfig_menus.json depends on the Kconfig
hierarchy and cannot be generated globally. It must be generated for
each executable to ensure that included and excluded components are
correctly positioned within the Kconfig menu hierarchy. Remove the
automatic generation of kconfig_menus.json.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
1fa10aa26a fix(cmakev2/kconfig): remove --env-file argument from base kconfgen command
The current base kconfgen command is stored in the __BASE_KCONFGEN_CMD
build property, and it includes the --env-file option pointing to the
`build/config.env` file. The `build/config.env` file does not separate
component configuration files into included and excluded components,
because it is created before any executable is added and we need it for
the initial sdkconfig generation. The global `build/config.env` can be
used for every sdkconfig format (cmake, json, txt), but not for the
kconfig_menus.json format, because kconfig_menus.json relies on the
Kconfig layout and hierarchy. Let's allow specifying the --env-file for
each kconfgen invocation and remove it from the base kconfgen command.
This allows you to specify an --env-file for each executable, each with
its own config.env file.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
a2d05cb92d fix(cmakev2/kconfig): __run_kconfgen does not take any arguments
The __run_kconfgen function does not take any arguments. The output
formats and related files are stored in the __KCONFGEN_OUTPUTS_CMD build
property.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
325c796ae7 feat(cmakev2/kconfig): add idf_create_save_defconfig function
This is basically a renamed version of __create_save_defconfig_target.
The creation of the save-defconfig target is done in
`idf_project_default()`.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
e117462137 feat(cmakev2/kconfig): add idf_create_menuconfig function
For a specified executable, create a menuconfig target using the name
provided in the TARGET option. The function generates a config.env file
specific to the executable, where Kconfig files for components linked to
the executable and Kconfig files for components not linked to it are
separated. This separation allows for a clear visual distinction between
the configuration of components that are linked and those that are not
linked to the executable within the menuconfig.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
b4197aabe6 feat(cmakev2/kconfig): add __create_executable_config_env_file function
Generate the config.env file for the specified executable. The
configuration file will be stored in the build directory, within a
directory named after the executable target name. The kconfigs*.in
files, which are generated by prepare_kconfig_files.py, will also be
stored in this directory.

This function primarily prepares the arguments for the
__create_config_env_file function based on the components linked to the
executable, ensuring that component Kconfig files are stored in the
appropriate kconfigs*.in files, depending on whether the component is
linked to the executable.

The directory where the generated files are stored is added to the
executable CONFIG_ENV_DIR property.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
dfc6bcb55f feat(cmakev2/kconfig): allow to specify Kconfig files for __create_config_env_file
The __create_config_env_file function generates a configuration file for
the prepare_kconfig_files.py script. Currently, it specifies the paths
for the kconfigs*.in files, which are generated by
prepare_kconfig_files.py, to be located in the build directory. The
kconfigs*.in files, along with the configuration file, must also be
generated for each executable, as each executable may have a
different set of linked components. Set the paths for the
kconfigs*.in files to be generated by the prepare_kconfig_files.py
script in the same directory as the configuration file.

Also allow explicit specification of which component configuration files
should be placed in different kconfigs*.in files. For sdkconfig
generation, it is not relevant whether a component's Kconfig file is
placed in the kconfigs.in or kconfigs_excluded.in file. This distinction
is only important for visually separating the configuration of included
and excluded components in the menuconfig. For the main sdkconfig, all
component Kconfig files are placed in the kconfigs.in file, and the
generated kconfigs*.in files are stored in the build directory. For
executables, the generated kconfigs*.in files will be stored in separate
directories for each executable.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
dc62a4c950 fix(cmakev2/kconfig): do not add excluded Kconfig files in the build properties
The excluded Kconfig files cannot be collected globally, they must be
collected per executable. The distinction between included and excluded
Kconfig files is relevant only for menuconfig, which is specific to each
executable, as each executable may have a different set of linked
components. For the global sdkconfig file and its CMake and JSON
variants, whether the Kconfig files are excluded or not is irrelevant.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00
Frantisek Hrbata
6f8e59c505 fix(test_build_system): use block comment instead of return for cmakev2 test app
Commit 46b41dfec187 ("test(cmakev2): Enable CI tests for component manager ..")
introduced a temporary workaround for the cmakev2 testing
application by including the cmakev1 project.cmake file after the
return() statement. The issue is that some tests, such as
test_build_fail_on_build_time, append commands to the project's
CMakeLists.txt. These commands are placed after the newly added return()
statement, causing them to be ignored and resulting in test failures. To
resolve this, include the cmakev1 project.cmake within the cmake block
comment.

Fixes: 46b41dfec187 ("test(cmakev2): Enable CI tests for component manager ..")
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-11-04 07:48:14 +01:00