forked from nrfconnect/sdk-zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nrf fromlist] cmake: introduce build_info function
The build_info function provides a generic and stable way of dumping build information to the <build>/build_info.yml file. The build info file is in YAML format and the keys in the file are intended to be stable, as to allow external tools to retrieve information regarding the build. The main differences to the CMakeCache.txt are: - Settings in the CMakeCache.txt are user controlled, whereas the information in the build info file is intended to be those values which are used by the build system regardless if those are specified by the developer or picked up automatically. - Internal build system variables are not present in the CMake cache and should not be, because their values are calculated when CMake runs. This also has the benefits of decoupling CMake variable names from build info keys. Several CMake variables has internal build system names, and the build system is free to rename those at its own discretion. Having dedicated key names ensures a stable API that external tools can rely upon. Upstream PR: zephyrproject-rtos/zephyr#79118 Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
- Loading branch information
Showing
3 changed files
with
177 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright (c) 2024, Nordic Semiconductor ASA | ||
|
||
# A pykwalify schema for basic validation of the Zephyr build info YAML file. | ||
|
||
type: map | ||
mapping: | ||
version: | ||
required: true | ||
type: str | ||
cmake: | ||
type: map | ||
mapping: | ||
application: | ||
type: map | ||
mapping: | ||
source-dir: | ||
type: str | ||
configuration-dir: | ||
type: str | ||
board: | ||
type: map | ||
mapping: | ||
name: | ||
required: true | ||
type: str | ||
qualifiers: | ||
type: str | ||
revision: | ||
type: str | ||
path: | ||
type: seq | ||
sequence: | ||
- type: str | ||
devicetree: | ||
type: map | ||
mapping: | ||
files: | ||
type: seq | ||
sequence: | ||
- type: str | ||
user-files: | ||
type: seq | ||
sequence: | ||
- type: str | ||
extra-user-files: | ||
type: seq | ||
sequence: | ||
- type: str | ||
include-dirs: | ||
type: seq | ||
sequence: | ||
- type: str | ||
bindings-dirs: | ||
type: seq | ||
sequence: | ||
- type: str | ||
kconfig: | ||
type: map | ||
mapping: | ||
files: | ||
type: seq | ||
sequence: | ||
- type: str | ||
user-files: | ||
type: seq | ||
sequence: | ||
- type: str | ||
extra-user-files: | ||
type: seq | ||
sequence: | ||
- type: str | ||
sysbuild: | ||
type: bool | ||
toolchain: | ||
type: map | ||
mapping: | ||
name: | ||
type: str | ||
version: | ||
type: str | ||
path: | ||
type: str | ||
zephyr: | ||
type: map | ||
mapping: | ||
zephyr-base: | ||
type: str | ||
version: | ||
type: str | ||
vendor-specific: | ||
type: map | ||
mapping: | ||
regex;(.*): | ||
type: map | ||
mapping: | ||
regex;(.*): | ||
type: str | ||
west: | ||
type: map | ||
mapping: | ||
command: | ||
type: str | ||
topdir: | ||
type: str |