[Differential] [Commented On] D3850: Pass -fno-operator-names when supported

Elvis Angelaccio noreply at phabricator.kde.org
Wed Jan 18 11:18:35 UTC 2017


elvisangelaccio added a comment.


  In https://phabricator.kde.org/D3850#72081, @kfunk wrote:
  
  > In https://phabricator.kde.org/D3850#72077, @elvisangelaccio wrote:
  >
  > > What about adding a way (cmake variable?) to opt-in if one wants to use the alternative operators? Personally I like and use them whenever I start something from scratch...
  >
  >
  > Hmm... You could overwrite the setting by just doing this after `include(KDECompilerSettings)`:
  >
  >   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -foperator-names")
  >
  >
  > But I just learned that clang++ (Clang 3.9) does not support -foperator-names. GCC does support it...
  >
  > I'd like to hear some more opinions (from Ivan maybe) first. Making the use of alternative tokens opt-in is an option of course.
  
  
  For the record, if anyone wants to override this flag, the following works also with clang 3.9:
  
    include(KDECompilerSettings)
    ...
    string(REPLACE "-fno-operator-names" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D3850

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kfunk, #frameworks, #buildsystem, ivan
Cc: rakuco, elvisangelaccio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170118/0d88a5b2/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list