]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Export whether we have encountered the ONEAPI TBB layout
authorMatthias Maier <tamiko@43-1.org>
Tue, 16 Nov 2021 18:49:45 +0000 (12:49 -0600)
committerMatthias Maier <tamiko@43-1.org>
Wed, 12 Jan 2022 10:16:55 +0000 (04:16 -0600)
cmake/configure/configure_1_tbb.cmake
cmake/modules/FindTBB.cmake
include/deal.II/base/config.h.in

index 9626f9d81dc86a3396566aaea2e6164e58435df2..73ff6645b5b6272acaafcbe2fe2f9dbeaa4d0ce1 100644 (file)
@@ -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()
 
 
index 43ceafbb1ab78eba363e8b1f1ee84c25573b27af..a92ade7f867bedea4fab8f7f8fea12296dafcd12 100644 (file)
@@ -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
index 0d128e0bbab4819c7cd549ae11d44429bc4dfc73..2d6326ee10f4e621ded277cd760a5db2214591ee 100644 (file)
@@ -72,6 +72,9 @@
 #define DEAL_II_WITH_THREADS
 
 #define TBB_SUPPRESS_DEPRECATED_MESSAGES 1
+
+#cmakedefine DEAL_II_TBB_WITH_ONEAPI
+
 #endif
 
 /***********************************************************************

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.