D16894: [ECM] use a macro to add compiler flags conditionally

René J.V. Bertin noreply at phabricator.kde.org
Mon Nov 19 09:50:46 GMT 2018


rjvbb updated this revision to Diff 45786.
rjvbb added a comment.


  This implements and uses my idea of an `ecm_add_<lang>_compiler_flags_if_supported`  function set for C and C++. It uses compiler ID+version conditions to determine if flag(s) are supported when those conditions are known and reliable - otherwise and only then does it resort to querying the compiler.
  
  I do not particularly care whether or not the KDE*CompilerSettings modules use the `SUPPORTED_IF` feature but I think it should be there as a courtesy to devs who have reasons to avoid querying the compiler (and for compilers where CMake's querying algorithm doesn't work).

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16894?vs=45567&id=45786

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

AFFECTED FILES
  kde-modules/KDECompilerSettings.cmake
  kde-modules/KDEFrameworkCompilerSettings.cmake
  modules/ECMAddCompilerFlag.cmake

To: rjvbb, #build_system, kfunk
Cc: kfunk, apol, kde-frameworks-devel, kde-buildsystem, #build_system, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181119/23f8bfcb/attachment.html>


More information about the Kde-frameworks-devel mailing list