Skip to content
Snippets Groups Projects
Commit c732b4d6 authored by Jö Fahlke's avatar Jö Fahlke Committed by Carsten Gräser
Browse files

[release][fs1650][cmake] Add -Wl,-no-as-needed to the linker flags if we are

on Ubuntu.

(cherry picked from commit 71e08e51)
Signed-off-by: default avatarCarsten Gräser <graeser@dune-project.org>
parent 0b6b4ac5
No related branches found
No related tags found
No related merge requests found
......@@ -304,8 +304,16 @@ if(${CMAKE_VERSION} VERSION_LESS "3.1")
else()
find_package(Threads)
endif()
set(STDTHREAD_LINK_FLAGS "${CMAKE_THREAD_LIBS_INIT}"
CACHE STRING "Linker flags needed to get working C++11 threads support")
# see whether threading needs -no-as-needed
if(EXISTS /etc/dpkg/origins/ubuntu)
set(NO_AS_NEEDED "-Wl,-no-as-needed")
else(EXISTS /etc/dpkg/origins/ubuntu)
set(NO_AS_NEEDED "")
endif(EXISTS /etc/dpkg/origins/ubuntu)
set(STDTHREAD_LINK_FLAGS "${NO_AS_NEEDED} ${CMAKE_THREAD_LIBS_INIT}"
CACHE STRING "Linker flags needed to get working C++11 threads support. On Ubuntu it may be necessary to include -Wl,-no-as-needed (see FS#1650).")
# set linker flags
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment