build: make non zephyr/ include prefix configurable
Add a Kconfig to disable non prefixed includes. By setting `CONFIG_LEGACY_INCLUDE_PATH=n` developers can disable having `include/zephyr` in the search path. This means that includes such as `#include <kernel.h>` will no longer work. Internally, every header should be updated to add the `zephyr/` prefix to the headers. Only then, will developers be able to use this config value for their applications. Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
parent
53ef68d459
commit
1ec0c6f530
9 changed files with 30 additions and 8 deletions
|
@ -5,7 +5,8 @@ set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|||
-c ${CMAKE_C_COMPILER}
|
||||
-o ${CMAKE_OBJCOPY}
|
||||
-i ${ZEPHYR_BASE}/include
|
||||
-i ${ZEPHYR_BASE}/include/zephyr
|
||||
$<$<BOOL:${CONFIG_LEGACY_INCLUDE_PATH}>:-i>
|
||||
$<$<BOOL:${CONFIG_LEGACY_INCLUDE_PATH}>:${ZEPHYR_BASE}/include/zephyr>
|
||||
-f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
|
|
|
@ -3,7 +3,8 @@ set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|||
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/arch/x86/zefi/zefi.py
|
||||
-c ${CMAKE_C_COMPILER}
|
||||
-i ${ZEPHYR_BASE}/include
|
||||
-i ${ZEPHYR_BASE}/include/zephyr
|
||||
$<$<BOOL:${CONFIG_LEGACY_INCLUDE_PATH}>:-i>
|
||||
$<$<BOOL:${CONFIG_LEGACY_INCLUDE_PATH}>:${ZEPHYR_BASE}/include/zephyr>
|
||||
-o ${CMAKE_OBJCOPY}
|
||||
-f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
|
||||
|
|
|
@ -5,7 +5,8 @@ set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
|||
-c ${CMAKE_C_COMPILER}
|
||||
-o ${CMAKE_OBJCOPY}
|
||||
-i ${ZEPHYR_BASE}/include
|
||||
-i ${ZEPHYR_BASE}/include/zephyr
|
||||
$<$<BOOL:${CONFIG_LEGACY_INCLUDE_PATH}>:-i>
|
||||
$<$<BOOL:${CONFIG_LEGACY_INCLUDE_PATH}>:${ZEPHYR_BASE}/include/zephyr>
|
||||
-f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
|
||||
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue