Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Zephyr ALLOW_EMPTY library property
This introduces a dedicated zephyr_library_property() function which provides a common way to set Zephyr build system known properties on Zephyr libraries. As a first common property is the `ALLOW_EMPTY` property which allows to create a `zephyr_library()` without putting any content inside of it. In general libraries should not be created unless there are files to places inside of it, however in some cases there are so many `zephyr_library_sources_ifdef(<setting> <file.c>)` where testing each setting before creating the library may not be desired. This commit allows the following construct in those cases: ``` zephyr_library() zephyr_library_property(ALLOW_EMPTY TRUE) zephyr_library_sources_ifdef(CONFIG_SETTING_1 file_1.c) zephyr_library_sources_ifdef(CONFIG_SETTING_2 file_2.c) ... zephyr_library_sources_ifdef(CONFIG_SETTING_n file_n.c) ``` Signed-off-by: Torsten Rasmussen <[email protected]>
- Loading branch information