This was ported from Autotools, however it’s entirely undocumented, so it’s unclear what we are trying to support, or why (and if we can just drop this entirely). It’d be good if it was documented, even just inline in the source: https://github.com/bitcoin/bitcoin/blob/36d4bd7fe326ba69e9372f8ddb3b12a3b5b36a3d/cmake/script/GenerateBuildInfo.cmake#L33 so it’s more clear what the use-case is.
Note that as-of 29.x
, the ways we distribute our source code will be via git clone, or using a tarball that was generated via git archive. So I guess that the usecase for BITCOIN_GENBUILD_NO_GIT
is to build from a git clone, but ignore the available version info (why?), or to build from a tarball that has been extacted into a git repository where we might pick up some other git information? It’s unclear if this is an actual usecase.