]> 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>
Thu, 9 Dec 2021 03:30:32 +0000 (21:30 -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 4c549dff74f617678eccaa8f33c53bdb7b6ecc98..89e2dc3552a908b32800f07e1f0e973e8328e3c8 100644 (file)
@@ -73,6 +73,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.