From: David Wells Date: Tue, 19 Jun 2018 18:02:18 +0000 (-0400) Subject: Require TBB 4.2.0 or newer. X-Git-Tag: v9.1.0-rc1~958^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6793%2Fhead;p=dealii.git 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. --- 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()