Page MenuHomePhabricator

[CMAKE] Add a facility to add flag groups and use it for -Wformat-*
ClosedPublic

Authored by Fabien on Jun 1 2020, 13:15.

Details

Summary

The -Wformat-security option is dependent on -Wformat on GCC and will
throw a warning when cmake check for the flag alone. Using a flag group
fixes the issue.
Note that -Wformat ends up added twice, since it can be used alone if
supported. CMake will deduplicate the flags for us.

Depends on D6310.

Test Plan
ninja -v all check-all

Check both flags are added to the command line (once each). Look at
CMakeFiles/CMakeOuptut.log and check there is no longer any warning
emitted when checking for -Wformat-security.

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Jun 1 2020, 13:15
This revision is now accepted and ready to land.Jun 1 2020, 13:23