Commit graph

3 commits

Author SHA1 Message Date
Yong Cong Sin bbe5e1e6eb build: namespace the generated headers with zephyr/
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.

Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.

Updated the includes path of in-tree sources accordingly.

Most of the changes here are scripted, check the PR for more
info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Yong Cong Sin c9818d5eea cmake: modules: generated_file_directories: fix paths
The paths that got assigned to these variable don't quite match
the description, likely a typo, fix that.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-30 12:36:11 +01:00
Martí Bolívar 53ab5fcf1c cmake: modules: add generated_file_directories
Due to Hyrum's Law, there are users out in the wild depending on this
directory existing to place their own generated files, so it'd break
things unnecessarily to not do this if we don't have a DTS, as
explained in a source code comment.

However, this doesn't really have anything to do with DTS processing,
so split it into its own module to separate concerns. This isn't
really a CMake module in the usual sense of something that defines
functions you can use, and is therefore a form of technical debt. The
decision was made to accept this because fixing this is a larger task
for the files in cmake/modules/, since there are multiple other
examples of this in here.

This also paves the way for inserting another module in between the
generated_file_directories and dts modules that itself depends on
these directories existing.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2023-04-12 13:04:31 +02:00