From: Daniel Arndt Date: Mon, 8 Apr 2019 12:49:40 +0000 (+0200) Subject: Require SymEngine version 0.4 X-Git-Tag: v9.1.0-rc1~215^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7896%2Fhead;p=dealii.git Require SymEngine version 0.4 --- diff --git a/cmake/configure/configure_symengine.cmake b/cmake/configure/configure_symengine.cmake index 4485401c9b..20da3601c2 100644 --- a/cmake/configure/configure_symengine.cmake +++ b/cmake/configure/configure_symengine.cmake @@ -17,11 +17,32 @@ # 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}) diff --git a/cmake/modules/FindSYMENGINE.cmake b/cmake/modules/FindSYMENGINE.cmake index 9c9dbbba07..20b73fa50b 100644 --- a/cmake/modules/FindSYMENGINE.cmake +++ b/cmake/modules/FindSYMENGINE.cmake @@ -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