代码拉取完成,页面将自动刷新
# This module is adapted from that in CADET (`<https://github.com/modsim/CADET)>`_):
# .. cmake_module::
# Find SUNDIALS, the SUite of Nonlinear and DIfferential/ALgebraic equation Solvers.
#
# The module looks for the following sundials components
#
# * sundials_ida
# * sundials_sunlinsolklu
# * sundials_sunmatrix_sparse
# * sundials_nvecserial
#
# To provide the module with a hint about where to find your SUNDIALS installation,
# you can set the environment variable :code:`SUNDIALS_ROOT`. The FindSUNDIALS module will
# then look in this path when searching for SUNDIALS paths and libraries.
# This behavior is defined in CMake >= 3.12, see policy CMP0074.
# It is replicated for older versions by adding the :code:`SUNDIALS_ROOT` variable to the
# :code:`PATHS` entry.
#
# This module will define the following variables:
# :code:`SUNDIALS_INCLUDE_DIRS` - Location of the SUNDIALS includes
# :code:`SUNDIALS_LIBRARIES` - Required libraries for all requested components
# List of the valid SUNDIALS components
# find the SUNDIALS include directories
find_path(SUNDIALS_INCLUDE_DIR
NAMES
ida/ida.h
sundials/sundials_math.h
sundials/sundials_types.h
sunlinsol/sunlinsol_klu.h
sunmatrix/sunmatrix_sparse.h
PATH_SUFFIXES
include
PATHS
${SUNDIALS_ROOT}
)
set(SUNDIALS_WANT_COMPONENTS
sundials_ida
sundials_sunlinsolklu
sundials_sunmatrixsparse
sundials_nvecserial
)
# find the SUNDIALS libraries
foreach(LIB ${SUNDIALS_WANT_COMPONENTS})
if (UNIX AND SUNDIALS_PREFER_STATIC_LIBRARIES)
# According to bug 1643 on the CMake bug tracker, this is the
# preferred method for searching for a static library.
# See http://www.cmake.org/Bug/view.php?id=1643. We search
# first for the full static library name, but fall back to a
# generic search on the name if the static search fails.
set(THIS_LIBRARY_SEARCH lib${LIB}.a ${LIB})
else()
set(THIS_LIBRARY_SEARCH ${LIB})
endif()
find_library(SUNDIALS_${LIB}_LIBRARY
NAMES ${THIS_LIBRARY_SEARCH}
PATH_SUFFIXES
lib
Lib
PATHS
${SUNDIALS_ROOT}
)
set(SUNDIALS_${LIB}_FOUND FALSE)
if (SUNDIALS_${LIB}_LIBRARY)
list(APPEND SUNDIALS_LIBRARIES ${SUNDIALS_${LIB}_LIBRARY})
set(SUNDIALS_${LIB}_FOUND TRUE)
endif()
mark_as_advanced(SUNDIALS_${LIB}_LIBRARY)
endforeach()
mark_as_advanced(
SUNDIALS_LIBRARIES
SUNDIALS_INCLUDE_DIR
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。