zephyr/cmake
Marc Herbert 654a2f245d git.cmake: print BUILD_VERSION always, simplify and fix error message
In an ideal world, good CIs make it very clear what exact git versions
are getting built. However:

- Zephyr is (re-)used in many projects and they cannot all be expected
  to have ideal CI.

- CI with multiple git repos is complex (#34713) which makes the world
  an even less ideal place: much more chance for some git versions to be
  missing.

- Many developers don't realize that Github and other CIs do not test
  pull/12345/head but the moving target pull/12345/merge instead. While
  not resolving pull/12345/merge completely (maybe another day), this
  commit provides at least evidence that pull/12345/head is NOT the
  commit tested.

So the addition of the following line in the logs is a very small price
to pay that can save enormous amounts of time when trying to understand
some obscure build failures.

-- BUILD_VERSION=zephyr-v2.5.0-2957-g6230b5bb66bc

Note this obviously does not provide any git information when
BUILD_VERSION is overriden but it does not hurt either in this case:
knowing BUILD_VERSION was overriden is also useful.

The "BUILD_VERSION is left undefined" message was just wrong in
the (unlikely) case `git describe` printed something while also
failing. Remove it; it's so much simpler to just print $BUILD_VERSION
and give the direct, unfiltered information.

Note this simplification is also a partial revert of 1b80f00f56
which threw the entire git warnings "baby" with some obscure duplicate
1.13.0 "bathwater" that is not relevant any more and that I guess barely
anyone noticed even at the time.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-05-06 16:30:15 -05:00
..
app runners: remove dependencies from runners 2021-04-19 15:35:30 +02:00
bintools toolchain: llvm: Find strip command 2021-04-17 21:03:13 -04:00
compiler cmake: gcc/clang: enable colour diagnostics in terminal output 2021-04-16 12:20:53 +02:00
emu cmake: emu: Add arm fvp emulator 2021-04-13 07:47:44 -04:00
flash runners: remove dependencies from runners 2021-04-19 15:35:30 +02:00
ide
linker toolchain: add support Intel oneApi toolchain based on llvm 2021-03-25 08:54:10 -04:00
makefile_exports
reports scripts: size_report: Add a depth parameter to CMakeLists.txt 2021-04-14 07:05:58 -04:00
toolchain cmake: llvm: llvm has no newlib 2021-04-22 07:42:58 -04:00
usage
util
boards.cmake
ccache.cmake
cfb.cmake
dts.cmake cmake: dtc: Validate EXTRA_DTC_FLAGS flags 2021-03-03 17:29:29 +01:00
extensions.cmake cmake: allow binary directory to be specified 2021-04-01 14:08:08 +02:00
extra_flags.cmake
gcc-m-cpu.cmake cmake: arm64: Add Cortex-R82 in toolchain option 2021-04-13 07:47:44 -04:00
generic_toolchain.cmake cmake: twister: Using common script for toolchain setting verification 2021-02-04 20:05:05 -05:00
git.cmake git.cmake: print BUILD_VERSION always, simplify and fix error message 2021-05-06 16:30:15 -05:00
hex.cmake
host-tools.cmake
kconfig.cmake cmake: kconfig: Remove unused extra dtc flags 2021-04-01 07:31:50 -05:00
kobj.cmake cmake: improved handling of output and byproducts in CMake 2021-02-14 18:09:24 -05:00
mcuboot.cmake
pristine.cmake
python.cmake cmake: use WEST_PYTHON as a preferred python installation if defined. 2021-04-27 13:31:23 -04:00
shields.cmake
target_toolchain.cmake
target_toolchain_flags.cmake
verify-toolchain.cmake cmake: twister: Using common script for toolchain setting verification 2021-02-04 20:05:05 -05:00
version.cmake
west.cmake cmake: west: do not print error if west topdir fails 2021-03-17 11:28:14 +01:00
zephyr_module.cmake cmake: modules: Remove duplicates only from existing ZEPHYR_MODULE_NAMES 2021-03-09 07:04:09 -05:00