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
Branch
cmake_remove_add_compiler_flags_to_var
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9027
Build 16016: Default Diff Build & Tests
Build 16015: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Jan 17 2020, 16:12
deadalnix added inline comments.
cmake/modules/AddCompilerFlags.cmake
115

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

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