mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-20 14:05:23 +01:00
build: suppress external warnings by default
This commit is contained in:
parent
7a59865793
commit
3b2acfcfec
3 changed files with 6 additions and 8 deletions
|
@ -67,7 +67,7 @@ if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
|
|||
test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
|
||||
fi
|
||||
|
||||
BITCOIN_CONFIG_ALL="--enable-suppress-external-warnings --disable-dependency-tracking"
|
||||
BITCOIN_CONFIG_ALL="--disable-dependency-tracking"
|
||||
if [ -z "$NO_DEPENDS" ]; then
|
||||
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} CONFIG_SITE=$DEPENDS_DIR/$HOST/share/config.site"
|
||||
fi
|
||||
|
|
|
@ -244,10 +244,10 @@ dnl May be useful if warnings from external headers clutter the build output
|
|||
dnl too much, so that it becomes difficult to spot Bitcoin Core warnings
|
||||
dnl or if they cause a build failure with --enable-werror.
|
||||
AC_ARG_ENABLE([suppress-external-warnings],
|
||||
[AS_HELP_STRING([--enable-suppress-external-warnings],
|
||||
[Suppress warnings from external headers (default is no)])],
|
||||
[AS_HELP_STRING([--disable-suppress-external-warnings],
|
||||
[Do not suppress warnings from external headers (default is to suppress)])],
|
||||
[suppress_external_warnings=$enableval],
|
||||
[suppress_external_warnings=no])
|
||||
[suppress_external_warnings=yes])
|
||||
|
||||
AC_ARG_ENABLE([lcov],
|
||||
[AS_HELP_STRING([--enable-lcov],
|
||||
|
|
|
@ -217,13 +217,11 @@ apt install clang-tidy bear clang
|
|||
Then, pass clang as compiler to configure, and use bear to produce the `compile_commands.json`:
|
||||
|
||||
```sh
|
||||
./autogen.sh && ./configure CC=clang CXX=clang++ --enable-suppress-external-warnings
|
||||
./autogen.sh && ./configure CC=clang CXX=clang++
|
||||
make clean && bear --config src/.bear-tidy-config -- make -j $(nproc)
|
||||
```
|
||||
|
||||
The output is denoised of errors from external dependencies and includes with
|
||||
`--enable-suppress-external-warnings` and `--config src/.bear-tidy-config`. Both
|
||||
options may be omitted to view the full list of errors.
|
||||
The output is denoised of errors from external dependencies.
|
||||
|
||||
To run clang-tidy on all source files:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue