Page MenuHomePhabricator

[CMAKE] Add the -commit suffix to version number through obj/build.h
ClosedPublic

Authored by Fabien on Aug 20 2019, 11:55.

Details

Summary

The obj/build.h header is built by calling the share/genbuild.sh
script and contains the commit description generated by git (the short
commit hash, eventually suffixed by -dirty).

This will allow to compare version numbers entirely between autotools
and CMake, avoiding confusion.

This should definitely by moved to the version.h file, but it is kept
as is for now so it remains compatible with the current codebase and
autotools.

Test Plan
ninja
./src/bitcoind -version

Check the suffix is the commit hash rather than -unk.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.