D17863: Add ecm_check_linker_flags function
Tobias C. Berner
noreply at phabricator.kde.org
Sat Dec 29 22:56:14 GMT 2018
tcberner created this revision.
tcberner added reviewers: FreeBSD, dfaure, apol.
Herald added projects: Frameworks, Build System.
Herald added subscribers: kde-buildsystem, kde-frameworks-devel.
tcberner requested review of this revision.
REVISION SUMMARY
kstars appends '-Wl,-z,nodump' to the linker flags, which is not supported
by lld>=7 (previous versions just discareded unkonwn flags).
Add an ecm module to check whether a linker flag is supported.
Usage:
```
include(ECMCheckLinkerFlags)
[...]
# Check for nodump support
SET(NODUMP_FLAGS "-Wl,-z,nodump")
ecm_check_linker_flags("${NODUMP_FLAGS}" NODUMP_SUPPORTED)
if (NODUMP_SUPPORTED)
SET(SEC_LINK_FLAGS "${SEC_LINK_FLAGS} ${NODUMP_FLAGS}")
endif ()
```
REPOSITORY
R240 Extra CMake Modules
BRANCH
master
REVISION DETAIL
https://phabricator.kde.org/D17863
AFFECTED FILES
modules/ECMCheckLinkerFlags.cmake
To: tcberner, #freebsd, dfaure, apol
Cc: kde-frameworks-devel, kde-buildsystem, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181229/c3cd8673/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list