Page MenuHomePhabricator

[CMAKE] Silent git error output when running from cmake
ClosedPublic

Authored by Fabien on Mar 9 2020, 17:05.

Details

Summary

The standard output is set to a variable and the result code is handled
by the cmake script, so there is no need for displaying the errors.
The output displayed on screen can be confusing in case of an error,
i.e:

fatal: not a git repository (or any of the parent directories): .git

when building from a github archive and not a repo
clone (see https://github.com/Bitcoin-ABC/bitcoin-abc/issues/371).

Test Plan

Don't run the test plan on your local dev repo. Clone a new one and
remove the .git directory.

cmake -GNinja ..
ninja check

There should be no fatal error output message.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable