]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bundled: export some useful version and package information
authorMatthias Maier <tamiko@43-1.org>
Tue, 29 Nov 2022 17:09:41 +0000 (11:09 -0600)
committerMatthias Maier <tamiko@43-1.org>
Wed, 30 Nov 2022 14:02:13 +0000 (08:02 -0600)
bundled/setup_bundled.cmake
include/deal.II/base/config.h.in

index 0934bdb3fb5b506ace94a242eac5d4a644aaeb9c..98f8edfb6e68e70c2bdeaffed92717e04db369e6 100644 (file)
@@ -32,6 +32,11 @@ option(DEAL_II_FORCE_BUNDLED_BOOST
 set(BOOST_FOLDER "${CMAKE_SOURCE_DIR}/bundled/boost-1.70.0")
 
 macro(feature_boost_configure_bundled)
+  set(BOOST_VERSION "1.70.0")
+  set(BOOST_VERSION_MAJOR "1")
+  set(BOOST_VERSION_MINOR "70")
+  set(BOOST_VERSION_SUBMINOR "0")
+
   #
   # Add rt to the link interface as well, boost/chrono needs it.
   #
@@ -43,21 +48,6 @@ macro(feature_boost_configure_bundled)
     endif()
   endif()
 
-  #
-  # We still need the version information, which is set up in the FindBoost
-  # module in the non-bundled case:
-  #
-  file(STRINGS "${BOOST_FOLDER}/include/boost/version.hpp"
-    BOOST_VERSION_STRING
-    REGEX "#define.*BOOST_VERSION")
-
-  string(REGEX REPLACE "^.*BOOST_VERSION.* ([0-9]+).*" "\\1"
-    BOOST_VERSION_NUMBER "${BOOST_VERSION_STRING}"
-    )
-  math(EXPR Boost_MAJOR_VERSION "${BOOST_VERSION_NUMBER} / 100000")
-  math(EXPR Boost_MINOR_VERSION "${BOOST_VERSION_NUMBER} / 100 % 1000")
-  math(EXPR Boost_SUBMINOR_VERSION "${BOOST_VERSION_NUMBER} % 100")
-
   if(CMAKE_SYSTEM_NAME MATCHES "Windows")
     #
     # Bundled boost tries to (dl)open itself as a dynamic library on
@@ -86,6 +76,10 @@ option(DEAL_II_FORCE_BUNDLED_KOKKOS
 set(KOKKOS_FOLDER "${CMAKE_SOURCE_DIR}/bundled/kokkos-3.7.00")
 
 macro(feature_kokkos_configure_bundled)
+  set(KOKKOS_VERSION "3.7.0")
+  set(Kokkos_DEVICES "Serial")
+  set(Kokkos_ARCH " ")
+
   list(APPEND DEAL_II_BUNDLED_INCLUDE_DIRS
     ${KOKKOS_FOLDER}/algorithms/src
     ${KOKKOS_FOLDER}/containers/src
@@ -109,6 +103,8 @@ option(DEAL_II_FORCE_BUNDLED_TASKFLOW
 set(TASKFLOW_FOLDER "${CMAKE_SOURCE_DIR}/bundled/taskflow-2.5.0")
 
 macro(feature_taskflow_configure_bundled)
+  set(TASKFLOW_VERSION "2.5.0")
+
   list(APPEND DEAL_II_BUNDLED_INCLUDE_DIRS ${TASKFLOW_FOLDER}/include)
 endmacro()
 
@@ -132,6 +128,10 @@ if( NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN"
 endif()
 
 macro(feature_tbb_configure_bundled)
+  set(TBB_VERSION "2018.0")
+  set(TBB_VERSION_MAJOR "2018")
+  set(TBB_VERSION_MINOR "0")
+
   #
   # We have to disable a bunch of warnings:
   #
@@ -161,6 +161,11 @@ option(DEAL_II_FORCE_BUNDLED_UMFPACK
 set(UMFPACK_FOLDER "${CMAKE_SOURCE_DIR}/bundled/umfpack")
 
 macro(feature_umfpack_configure_bundled)
+  set(UMFPACK_VERSION "5.0.2")
+  set(UMFPACK_VERSION_MAJOR "5")
+  set(UMFPACK_VERSION_MINOR "0")
+  set(UMFPACK_VERSION_SUBMINOR "2")
+
   list(APPEND DEAL_II_BUNDLED_INCLUDE_DIRS
     ${UMFPACK_FOLDER}/UMFPACK/Include ${UMFPACK_FOLDER}/AMD/Include
     )
@@ -178,7 +183,11 @@ option(DEAL_II_FORCE_BUNDLED_MUPARSER
 
 set(MUPARSER_FOLDER "${CMAKE_SOURCE_DIR}/bundled/muparser_v2_3_3/")
 
-
 macro(feature_muparser_configure_bundled)
+  set(MUPARSER_VERSION "2.3.3")
+  set(MUPARSER_VERSION_MAJOR "2")
+  set(MUPARSER_VERSION_MINOR "3")
+  set(MUPARSER_VERSION_SUBMINOR "3")
+
   list(APPEND DEAL_II_BUNDLED_INCLUDE_DIRS ${MUPARSER_FOLDER}/include)
 endmacro()
index 2bb11c61ff7f2fdaa61195fd65ceceb400959902..47e0644ff1e29a04d633ac5b67970ddfade8d4b5 100644 (file)
 /*
  * boost:
  */
-#define DEAL_II_BOOST_VERSION_MAJOR @Boost_MAJOR_VERSION@
-#define DEAL_II_BOOST_VERSION_MINOR @Boost_MINOR_VERSION@
-#define DEAL_II_BOOST_VERSION_SUBMINOR @Boost_SUBMINOR_VERSION@
+#define DEAL_II_BOOST_VERSION_MAJOR @BOOST_VERSION_MAJOR@
+#define DEAL_II_BOOST_VERSION_MINOR @BOOST_VERSION_MINOR@
+#define DEAL_II_BOOST_VERSION_SUBMINOR @BOOST_VERSION_SUBMINOR@
 
 #define DEAL_II_BOOST_VERSION_GTE(major,minor,subminor) \
  ((DEAL_II_BOOST_VERSION_MAJOR * 100000 + \

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.