Skip to content

Commit

Permalink
Require GINKGO 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Castelli committed Aug 24, 2021
1 parent 44b6aad commit 9c4f1d7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cmake/configure/configure_2_ginkgo.cmake
Expand Up @@ -17,4 +17,31 @@
# Configuration for the Ginkgo library:
#

MACRO(FEATURE_GINKGO_FIND_EXTERNAL var)
FIND_PACKAGE(GINKGO)

IF(GINKGO_FOUND)
SET(${var} TRUE)

#
# We require at least version 1.4.0
# - The interface requires in fact only GINKGO 1.3.0, however, below 1.4.0
# the LD_LIBRARY_PATH has to be set manually by:
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GINKGO_DIR/lib
#
SET(_version_required 1.4.0)
IF(GINKGO_VERSION VERSION_LESS ${_version_required})
MESSAGE(STATUS "Insufficient ginkgo installation found: "
"At least version ${_version_required} is required."
)
SET(GINKGO_ADDITIONAL_ERROR_STRING
"Insufficient ginkgo installation found!\n"
"At least version ${_version_required} is required.\n"
)
SET(${var} FALSE)

ENDIF()
ENDIF()
ENDMACRO()

CONFIGURE_FEATURE(GINKGO)
8 changes: 8 additions & 0 deletions cmake/modules/FindGINKGO.cmake
Expand Up @@ -20,6 +20,7 @@
#
# GINKGO_INCLUDE_DIRS
# GINKGO_INTERFACE_LINK_FLAGS
# GINGKO_VERSION
#

SET(GINKGO_DIR "" CACHE PATH "An optional hint to a GINKGO installation")
Expand Down Expand Up @@ -63,6 +64,13 @@ FOREACH(_library ginkgo ${GINKGO_INTERFACE_LINK_LIBRARIES})
)
ENDFOREACH()

#
# Get ginkgo version number
#
IF(Ginkgo_FOUND)
SET(GINKGO_VERSION "${GINKGO_PROJECT_VERSION}")
ENDIF()

DEAL_II_PACKAGE_HANDLE(GINKGO
LIBRARIES REQUIRED ${_libraries}
INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR
Expand Down

0 comments on commit 9c4f1d7

Please sign in to comment.