HomePhabricator

[CMAKE] Add compiler flags to some build configuration only

Description

[CMAKE] Add compiler flags to some build configuration only

Summary:
This adds new facilities to add flags or definitions that only apply to
some build configuration. This is especially useful to pass debug only
flags.

Test Plan:

cmake -GNinja .. -DCMAKE_BUILD_TYPE=Debug
ninja -v check

Ensure the flags and definitions are correctly passed on the compilation
lines.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4949