Pass -fno-operator-names when supported

Authored by kfunk on Dec 29 2016, 11:23 AM.

Description

Pass -fno-operator-names when supported

Summary:
Disables alternative tokens for &&, ||, etc.. They're are not supported
by MSVC out of the box, thus using them will limit the portability of
the code. There *are* options to make alternative tokens available under
MSVC [1], but I think we shouldn't promote the usage of them.

From the GCC documentation:
-fno-operator-names: Do not treat the operator name keywords and,
bitand, bitor, compl, not, or and xor as synonyms as keywords.

[1] http://stackoverflow.com/questions/555505/when-were-the-and-and-or-alternative-tokens-introduced-in-c

Reviewers: Frameworks, #buildsystem, ivan

Reviewed By: ivan

Subscribers: rakuco, elvisangelaccio

Differential Revision: https://phabricator.kde.org/D3850

Details

Committed
kfunkJan 16 2017, 7:46 AM
Reviewer
ivan
Differential Revision
D3850: Pass -fno-operator-names when supported
Parents
R240:01f52b2b03f9: Change minimum CMake requirement to be the same as ECM
Branches
Unknown
Tags
Unknown