D16894: [ECM] use a macro to test compiler flag support
René J.V. Bertin
noreply at phabricator.kde.org
Fri Nov 16 09:47:01 GMT 2018
rjvbb updated this revision to Diff 45567.
rjvbb added a comment.
A simpler version, setting CMAKE_<LANG>_FLAGS directly (also fixes a persistence error in my previous implementation).
I've thought some more about "why not just use check_<lang>_compiler_flag everywhere". I think that the risk with using a built-in function is that future developers or maintainers may think to be smart and replace them with built-in ID+version checking. Because we know since what version which compiler supports a given flag, right? Providing a dedicated function should reduce that risk, if not only because of the comments it comes with.
Ideally there should probably also be a version that accepts multiple flags; would that be possible with cmake's language?
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D16894?vs=45513&id=45567
REVISION DETAIL
https://phabricator.kde.org/D16894
AFFECTED FILES
kde-modules/KDECompilerSettings.cmake
kde-modules/KDEFrameworkCompilerSettings.cmake
To: rjvbb, #build_system
Cc: 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-buildsystem/attachments/20181116/60d3692b/attachment.html>
More information about the Kde-buildsystem
mailing list