]> Git Repo - VerusCoin.git/commit - configure.ac
build: quiet annoying warnings without adding new ones
authorCory Fields <[email protected]>
Wed, 9 Mar 2016 21:45:58 +0000 (16:45 -0500)
committerJack Grigg <[email protected]>
Fri, 1 Dec 2017 14:10:16 +0000 (14:10 +0000)
commit341ab7453295ca387a5e2aaf75f7e5240e8bff96
tree14209bba1b0df7243e68288234dbb8c4925135b6
parentc5d645e22f5efcf85acacc80647a1ae70bad95ac
build: quiet annoying warnings without adding new ones

Disabling warnings can be tricky, because doing so can cause a different
compiler to create new warnings about unsupported disable flags. Also, some
warnings don't surface until they're paired with another warning (gcc). For
example, adding "-Wno-foo" won't cause any trouble, but if there's a legitimate
warning emitted, the "unknown option -Wno-foo" will show up as well.

Work around this in 2 ways:

1. When checking to see if -Wno-foo is supported, check for "-Wfoo" instead.
2. Enable -Werror while checking 1.

If "-Werror -Wfoo" compiles, "-Wno-foo" is almost guaranteed to be supported.

-Werror itself is also checked. If that fails to compile by itself, it likely
means that the user added a flag that adds a warning. In that case, -Werror
won't be used while checking, and the build may be extra noisy. The user would
need to fix the bad input flag.

Also, silence 2 more additional warnings that can show up post-c++11.
configure.ac
This page took 0.023843 seconds and 4 git commands to generate.