Skip to content

Conversation

mlandersonjlg
Copy link
Contributor

@mlandersonjlg mlandersonjlg commented May 19, 2025

This prevents warnings in clang compiler and IWYU tool

Example for #include "etl/delegate.h"

Included header delegate.h is not used directly (fix available)clangd[unused-includes](https://clangd.llvm.org/guides/include-cleaner)

https://clangd.llvm.org/guides/include-cleaner#iwyu-pragmas
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md#iwyu-pragma-export

MarshMilo100 and others added 3 commits April 23, 2025 17:33
The Zephyr build system requires that modules have a `module.yml` file to specify where the module cmake and kconfig files are located. 
These can also be explicitly set as "external" meaning that they do not exist within the module tree, itself. These build file can still be specified elsewhere via cmake variables, explained more in-depth here: https://docs.zephyrproject.org/latest/develop/modules.html#modules-module-ext-root
This change makes it such that ETL can be included more easily in zephyr projects running on embedded systems. A similar change can be observed in the public nanopb repository, where the repo only requires its own `zephyr/module.yml` file to be found by the zephyr build system, but the kconfig and cmake additions can exist outside of the library repository.
This will allow ETL to be included via west in a zephyr build without any additional wrappers or external kconfigs.

Signed-off-by: Zach Van Camp <[email protected]>
Co-authored-by: Zach Van Camp <[email protected]>
@drewr95
Copy link
Contributor

drewr95 commented May 21, 2025

This is nice when using clang-tidy as it always flags these headers and suggests to fix by including the direct private implementations. This also avoids having to set the .clang-tidy file to blanketly ignore these headers.

@jwellbelove jwellbelove changed the base branch from master to development May 21, 2025 14:23
@jwellbelove jwellbelove merged commit 1ebc659 into ETLCPP:development May 21, 2025
jwellbelove added a commit that referenced this pull request May 21, 2025
)

* Add Zephyr build system module.yml (#1074)

The Zephyr build system requires that modules have a `module.yml` file to specify where the module cmake and kconfig files are located.
These can also be explicitly set as "external" meaning that they do not exist within the module tree, itself. These build file can still be specified elsewhere via cmake variables, explained more in-depth here: https://docs.zephyrproject.org/latest/develop/modules.html#modules-module-ext-root
This change makes it such that ETL can be included more easily in zephyr projects running on embedded systems. A similar change can be observed in the public nanopb repository, where the repo only requires its own `zephyr/module.yml` file to be found by the zephyr build system, but the kconfig and cmake additions can exist outside of the library repository.

* Add full West support for ETL (#1075)

This will allow ETL to be included via west in a zephyr build without any additional wrappers or external kconfigs.

Signed-off-by: Zach Van Camp <[email protected]>
Co-authored-by: Zach Van Camp <[email protected]>

* Add IWYU pragmas to private headers which provide library symbols
This prevents warnings in clang compiler and IWYU tool
https://clangd.llvm.org/guides/include-cleaner#iwyu-pragmas
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md#iwyu-pragma-export

---------

Signed-off-by: Zach Van Camp <[email protected]>
Co-authored-by: Zach Van Camp <[email protected]>
Co-authored-by: Zach Van Camp <[email protected]>
Co-authored-by: John Wellbelove <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants