Page MenuHomePhabricator

[CMAKE] Get rid of `add_compiler_flags_to_var`
ClosedPublic

Authored by Fabien on Jan 17 2020, 16:02.

Details

Summary

The last callsite is in the check_linker_flags function. Adding the
logic at the callsite allow to remove this function from the API.

There is no change in behavior.

Depends on D4961.

Test Plan
ninja check

Diff Detail

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

Event Timeline

deadalnix requested changes to this revision.Jan 17 2020, 16:12
deadalnix added inline comments.
cmake/modules/AddCompilerFlags.cmake
115 ↗(On Diff #15602)

The flag not being supported should be a had fail.

This revision now requires changes to proceed.Jan 17 2020, 16:12
Fabien requested review of this revision.Jan 17 2020, 16:27
Fabien added inline comments.
cmake/modules/AddCompilerFlags.cmake
115 ↗(On Diff #15602)

If there is no unused-command-line-argument warning (GCC) then there is no reason to promote it as an error. It's fine to continue in this case and not fail.

This revision is now accepted and ready to land.Jan 17 2020, 16:44