From ec3dad54b3bc1442ef1ae49db7c1c92d643a45e9 Mon Sep 17 00:00:00 2001 From: Simon Heybrock Date: Wed, 3 May 2017 09:24:41 +0200 Subject: [PATCH] Re #19470. Add 14.04 linker options required for std::call_once. --- Framework/Indexing/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Framework/Indexing/CMakeLists.txt b/Framework/Indexing/CMakeLists.txt index d997bb0d6018..005b9c9132a9 100644 --- a/Framework/Indexing/CMakeLists.txt +++ b/Framework/Indexing/CMakeLists.txt @@ -69,6 +69,12 @@ set_property ( TARGET Indexing PROPERTY FOLDER "MantidFramework" ) target_link_libraries ( Indexing LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${MANTIDLIBS} ) +if( "${UNIX_CODENAME}" STREQUAL "trusty" ) + # Special linking options are required for some older Ubuntu gcc builds to use std::thread, specific options found here: + # http://stackoverflow.com/questions/8649828/what-is-the-correct-link-options-to-use-stdthread-in-gcc-under-linux#comment35723468_8649908 + target_link_libraries ( Indexing LINK_PRIVATE -Wl,--no-as-needed -pthread ) +endif() + # Add the unit tests directory add_subdirectory ( test )