]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Require SymEngine version 0.4 7896/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 8 Apr 2019 12:49:40 +0000 (14:49 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 8 Apr 2019 12:49:40 +0000 (14:49 +0200)
cmake/configure/configure_symengine.cmake
cmake/modules/FindSYMENGINE.cmake

index 4485401c9bec732a81804930ba0f085c5491c48a..20da3601c285f61554a3299e211d8a61eafe1bef 100644 (file)
 # Configuration for the SymEngine library:
 #
 
-#
-# We require at least version 0.3 of the symengine library:
-#
-SET(SYMENGINE_MINIMUM_REQUIRED_VERSION "0.3")
 
+MACRO(FEATURE_SYMENGINE_FIND_EXTERNAL var)
+  FIND_PACKAGE(SYMENGINE)
+
+  IF(SYMENGINE_FOUND)
+    SET(${var} TRUE)
+
+    #
+    # We require at least version 0.4 of the symengine library:
+    #
+    SET(_version_required "0.4")
+
+    IF(SYMENGINE_VERSION VERSION_LESS ${_version_required})
+      MESSAGE(STATUS "Insufficient SymEngine installation found: "
+              "At least version ${_version_required} is required "
+              "but version ${SYMENGINE_VERSION} was found."
+             )
+      SET(SYMENGINE_ADDITIONAL_ERROR_STRING
+          "Insufficient SymEngine installation found!\n"
+          "At least version ${_version_required} is required "
+          "but version ${SYMENGINE_VERSION} was found.\n"
+         )
+      SET(${var} FALSE)
+    ENDIF()
+  ENDIF()
+ENDMACRO()
 
 MACRO(FEATURE_SYMENGINE_CONFIGURE_EXTERNAL)
   SET(DEAL_II_SYMENGINE_WITH_LLVM ${SYMENGINE_WITH_LLVM})
index 9c9dbbba071f608ba1bca3081b2821bd6fe0d3ad..20b73fa50b6e3b037211d67c9581435d8d51a21d 100644 (file)
@@ -35,7 +35,7 @@ SET (DEAL_II_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
 #
 # Include the SymEngine:
 #
-FIND_PACKAGE(SymEngine ${SYMENGINE_MINIMUM_REQUIRED_VERSION}
+FIND_PACKAGE(SymEngine
   CONFIG QUIET
   HINTS ${SYMENGINE_DIR}
   PATH_SUFFIXES lib/cmake/symengine

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.