From: Matthias Maier Date: Tue, 16 Nov 2021 18:49:45 +0000 (-0600) Subject: CMake: Export whether we have encountered the ONEAPI TBB layout X-Git-Tag: v9.4.0-rc1~754^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e505d94d9c83445f794cbe405e2d219ea0c3b6a;p=dealii.git CMake: Export whether we have encountered the ONEAPI TBB layout --- diff --git a/cmake/configure/configure_1_tbb.cmake b/cmake/configure/configure_1_tbb.cmake index 9626f9d81d..73ff6645b5 100644 --- a/cmake/configure/configure_1_tbb.cmake +++ b/cmake/configure/configure_1_tbb.cmake @@ -25,6 +25,8 @@ MACRO(FEATURE_TBB_FIND_EXTERNAL var) SET(${var} TRUE) ENDIF() + SET(DEAL_II_TBB_WITH_ONEAPI ${TBB_WITH_ONEAPI}) + # # TBB currently uses the version numbering scheme # @@ -75,6 +77,8 @@ MACRO(FEATURE_TBB_CONFIGURE_BUNDLED) LIST(APPEND TBB_LIBRARIES ${CMAKE_DL_LIBS}) LIST(APPEND TBB_BUNDLED_INCLUDE_DIRS ${TBB_FOLDER}/include) + + SET(DEAL_II_TBB_WITH_ONEAPI FALSE) ENDMACRO() diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake index 43ceafbb1a..a92ade7f86 100644 --- a/cmake/modules/FindTBB.cmake +++ b/cmake/modules/FindTBB.cmake @@ -21,6 +21,7 @@ # TBB_LIBRARIES # TBB_INCLUDE_DIRS # TBB_WITH_DEBUGLIB +# TBB_WITH_ONEAPI # TBB_VERSION # TBB_VERSION_MAJOR # TBB_VERSION_MINOR @@ -81,6 +82,7 @@ IF(EXISTS ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h) "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}" ) + SET(TBB_WITH_ONEAPI FALSE) ELSE() # @@ -108,6 +110,8 @@ ELSE() "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}" ) ENDIF() + + SET(TBB_WITH_ONEAPI TRUE) ENDIF() DEAL_II_PACKAGE_HANDLE(TBB diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 4c549dff74..89e2dc3552 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -73,6 +73,9 @@ #define DEAL_II_WITH_THREADS #define TBB_SUPPRESS_DEPRECATED_MESSAGES 1 + +#cmakedefine DEAL_II_TBB_WITH_ONEAPI + #endif /***********************************************************************