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>
25 lines
638 B
CMake
25 lines
638 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
include_guard(GLOBAL)
|
|
|
|
# This file creates locations in the build directory
|
|
# for placing generated files.
|
|
#
|
|
# Outcome:
|
|
# - BINARY_DIR_INCLUDE is set to ${PROJECT_BINARY_DIR}/include
|
|
# - BINARY_DIR_INCLUDE_GENERATED is set to ${BINARY_DIR_INCLUDE}/generated/zephyr
|
|
# - BINARY_DIR_INCLUDE_GENERATED is a directory
|
|
#
|
|
# Required variables:
|
|
# None
|
|
#
|
|
# Optional variables:
|
|
# None
|
|
#
|
|
# Optional environment variables:
|
|
# None
|
|
|
|
set(BINARY_DIR_INCLUDE ${PROJECT_BINARY_DIR}/include)
|
|
set(BINARY_DIR_INCLUDE_GENERATED ${BINARY_DIR_INCLUDE}/generated/zephyr)
|
|
file(MAKE_DIRECTORY ${BINARY_DIR_INCLUDE_GENERATED})
|