Skip to content
Commit 5d5c2d47 authored by Torsten Rasmussen's avatar Torsten Rasmussen Committed by Carles Cufí
Browse files

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.

Signed-off-by: default avatarTorsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
parent daac2d55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment