From 37230d8020a6090378ab636f996d136280a61a27 Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 19 Jun 2018 14:02:18 -0400 Subject: [PATCH] Require TBB 4.2.0 or newer. TBB 4.1 is not compatible with newer versions of GCC due to some missing std::atomic::load calls, so lets blacklist all older versions. --- cmake/configure/configure_1_threads.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cmake/configure/configure_1_threads.cmake b/cmake/configure/configure_1_threads.cmake index bfae7589fd..7cfe00dd43 100644 --- a/cmake/configure/configure_1_threads.cmake +++ b/cmake/configure/configure_1_threads.cmake @@ -138,6 +138,25 @@ MACRO(FEATURE_THREADS_FIND_EXTERNAL var) IF(TBB_FOUND) SET(${var} TRUE) ENDIF() + + # + # TBB versions before 4.2 are missing some explicit calls to std::atomic::load + # in ternary expressions; these cause compilation errors in some compilers + # (such as GCC 8.1 and newer). To fix this we simply blacklist all older + # versions: + # + IF(TBB_VERSION VERSION_LESS "4.2") + MESSAGE(STATUS + "The externally provided TBB library is older than version 4.2.0, which " + "cannot be used with deal.II." + ) + SET(THREADS_ADDITIONAL_ERROR_STRING + "The externally provided TBB library is older than version\n" + "4.2.0, which is the oldest version compatible with deal.II and its\n" + "supported compilers." + ) + SET(${var} FALSE) + ENDIF() ENDMACRO() -- 2.39.5