HomePhabricator

[CMAKE] Avoid duplicating the compiler/linker flags

Authored by Fabien on Thu, Aug 8, 14:19.

Description

[CMAKE] Avoid duplicating the compiler/linker flags

Summary:
This will allow for adding the flags both at top level and in the
submodules (e.g. secp256k1) whithout duplicating them on the command
line, thus allowing these submodules to build standalone.

Note: duplicating the flag is not very expensive as the check result is
already in cache.

Depends on D3825.

Test Plan:

ninja

Duplicate a compiler and/or linker flag and run ninja -v.
Check in the output that the flag is not duplicated on the command line.

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

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

Details

Committed
FabienSun, Aug 11, 08:06
Pushed
FabienSun, Aug 11, 08:06
Reviewer
Restricted Project
Differential Revision
D3826: [CMAKE] Avoid duplicating the compiler/linker flags
Parents
rABCc907fdbf9748: [CMAKE] Fix -Wunused-command-line-argument when adding linker flag
Branches
Unknown
Tags
Unknown