Page MenuHomePhabricator

[CMAKE] Get rid of `add_compiler_flags_to_var`
ClosedPublic

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

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC98e3d4d14b82: [CMAKE] Get rid of `add_compiler_flags_to_var`
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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Jan 17 2020, 16:02
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 17 2020, 16:02
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.

deadalnix accepted this revision.Jan 17 2020, 16:44
This revision is now accepted and ready to land.Jan 17 2020, 16:44
This revision was automatically updated to reflect the committed changes.