]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: Export -pthread when trying to link 1545/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 7 Sep 2015 21:04:01 +0000 (16:04 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 7 Sep 2015 21:05:31 +0000 (16:05 -0500)
It turns out that clang is a bit more picky and wants to have -pthread
on the command line.

cmake/checks/check_01_cxx_features.cmake

index f8775c5c23e6608869ec54b2f2a3c52e6d371e0d..3e39aed620a84e8141b942f13bbc5bfe4d33e5ae 100644 (file)
@@ -217,6 +217,7 @@ IF(NOT DEFINED DEAL_II_WITH_CXX11 OR DEAL_II_WITH_CXX11)
       "
       DEAL_II_HAVE_CXX11_SHARED_PTR)
 
+    PUSH_CMAKE_REQUIRED("-pthread")
     CHECK_CXX_SOURCE_COMPILES(
       "
       #include <thread>
@@ -224,6 +225,8 @@ IF(NOT DEFINED DEAL_II_WITH_CXX11 OR DEAL_II_WITH_CXX11)
       int main(){ std::thread t(f,1); t.join(); return 0; }
       "
       DEAL_II_HAVE_CXX11_THREAD)
+    RESET_CMAKE_REQUIRED()
+    PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_VERSION_FLAG}")
 
     CHECK_CXX_SOURCE_COMPILES(
       "

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.