D16894: [ECM] use a macro to test compiler flag support
René J.V. Bertin
noreply at phabricator.kde.org
Thu Nov 15 13:39:37 GMT 2018
rjvbb added inline comments.
INLINE COMMENTS
> apol wrote in KDECompilerSettings.cmake:195
> Why can't we just use check_cxx_compiler_flag?
We could of course. I worked under the assumption that is not done currently because checking only ID+version is faster. CMake's check_cxx_compiler_flag is more expensive because it invokes the compiler.
And it can fail, for instance if the user adds an option for which the compiler emits diagnostics output. That will be true for the "clang on Mac" situation too, but why generalise brittleness if you don't have to?
> apol wrote in KDECompilerSettings.cmake:203
> Why have a macro that only works on Apple?
? This is a macro that encapsulates a Mac-specific peculiarity but otherwise should work everywhere. Did I miss something?!
NB: `${_RESULT}` is not going to be set if `COMPILER_OK` isn't set first, meaning the macro should always "return false" when a flag isn't supported, even if check_cxx_compiler_flag isn't used.
REPOSITORY
R240 Extra CMake Modules
REVISION DETAIL
https://phabricator.kde.org/D16894
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-frameworks-devel/attachments/20181115/c1698281/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list