From 1012c7652a91fff07ccab5a5598cabb85f977bc3 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Tue, 14 Jul 2015 14:37:31 -0400 Subject: [PATCH] disable cxx11 on clang with libc++ if buggy --- cmake/checks/check_01_cxx_features.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index f548550bfc..2c46133e0e 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -181,6 +181,15 @@ IF(NOT DEFINED DEAL_II_WITH_CXX11 OR DEAL_II_WITH_CXX11) " DEAL_II_HAVE_CXX11_FUNCTIONAL_GCCBUG35569_OK) + # clang libc++ bug, see https://llvm.org/bugs/show_bug.cgi?id=20084 + CHECK_CXX_SOURCE_COMPILES( + " + #include + struct A { void foo() const {} }; + int main() { A a; std::bind(&A::foo,a)(); return 0; } + " + DEAL_II_HAVE_CXX11_FUNCTIONAL_LLVMBUG20084_OK) + CHECK_CXX_SOURCE_COMPILES( " #include @@ -312,6 +321,7 @@ IF(NOT DEFINED DEAL_II_WITH_CXX11 OR DEAL_II_WITH_CXX11) DEAL_II_HAVE_CXX11_CONDITION_VARIABLE AND DEAL_II_HAVE_CXX11_FUNCTIONAL AND DEAL_II_HAVE_CXX11_FUNCTIONAL_GCCBUG35569_OK AND + DEAL_II_HAVE_CXX11_FUNCTIONAL_LLVMBUG20084_OK AND DEAL_II_HAVE_CXX11_SHARED_PTR AND DEAL_II_HAVE_CXX11_THREAD AND DEAL_II_HAVE_CXX11_MUTEX AND -- 2.39.5