From b86de99b1cf9fb3fba0a5c43ce31a3e424b89276 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 23 Jan 2013 11:18:06 +0000 Subject: [PATCH] Cleanup in c++11 thread support test git-svn-id: https://svn.dealii.org/branches/branch_cmake@28162 0785d39b-7218-0410-832d-ea1e28bc413d --- .../cmake/checks/check_01_cxx_features.cmake | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/deal.II/cmake/checks/check_01_cxx_features.cmake b/deal.II/cmake/checks/check_01_cxx_features.cmake index 8c3c80d0a5..6e4b497a91 100644 --- a/deal.II/cmake/checks/check_01_cxx_features.cmake +++ b/deal.II/cmake/checks/check_01_cxx_features.cmake @@ -104,30 +104,26 @@ IF(DEAL_II_HAVE_CXX11_FLAG) " DEAL_II_HAVE_CXX11_SHARED_PTR) - CHECK_CXX_SOURCE_COMPILES( - " - #include - void f(int){} - int main(){ std::thread t(f,1); t.join(); return 0; } - " - DEAL_II_HAVE_CXX11_THREAD) - # # On some systems with gcc 4.5.0, we can compile the code - # above but it will throw an exception when run. So test - # that as well. The test will only be successful if we have - # libpthread available, so link it in for this test. If - # multithreading is requested, it will be added to CXXFLAGS - # later on so there is no need to do this here. + # below but it will throw an exception when run. So test + # that as well. + # + # TODO: Get somehow rid of the platform introspection... # - PUSH_TEST_FLAG("-lpthread") + # TODO: This test will only succeed on platforms where "-pthread" is + # recognized. But this isn't easily fixable: + # configure_threads.cmake which will determine and setup threads + # has to be called later... + # + PUSH_TEST_FLAG("-pthread") CHECK_CXX_SOURCE_RUNS( " #include void f(int){} int main(){ std::thread t(f,1); t.join(); return 0; } " - DEAL_II_HAVE_CXX11_THREAD_RUN_OK) + DEAL_II_HAVE_CXX11_THREAD) POP_TEST_FLAG() CHECK_CXX_SOURCE_COMPILES( @@ -162,7 +158,6 @@ IF(DEAL_II_HAVE_CXX11_FLAG) DEAL_II_HAVE_CXX11_FUNCTIONAL_GCCBUG35569_OK AND DEAL_II_HAVE_CXX11_SHARED_PTR AND DEAL_II_HAVE_CXX11_THREAD AND - DEAL_II_HAVE_CXX11_THREAD_RUN_OK AND DEAL_II_HAVE_CXX11_MUTEX AND DEAL_II_HAVE_CXX11_TUPLE AND DEAL_II_HAVE_CXX11_TYPE_TRAITS ) -- 2.39.5