Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed May 17, 2024
1 parent c7f9df5 commit fad067c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/FindSUNDIALS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

find_path (SUNDIALS_INCLUDE_DIR sundials_config.h PATH_SUFFIXES sundials)

file (STRINGS ${SUNDIALS_INCLUDE_DIR}/sundials_config.h _VERSION_DEFINE_STRING REGEX "#define SUNDIALS_VERSION .*")
file (STRINGS ${SUNDIALS_INCLUDE_DIR}/sundials_config.h _VERSION_DEFINE_STRING REGEX "#define (SUNDIALS_VERSION|SUNDIALS_PACKAGE_VERSION) .*")
if (_VERSION_DEFINE_STRING)
string (REGEX REPLACE "#define SUNDIALS_VERSION \"([0-9\.]+)\"" "\\1" SUNDIALS_VERSION ${_VERSION_DEFINE_STRING})
string (REGEX REPLACE "#define (SUNDIALS_VERSION|SUNDIALS_PACKAGE_VERSION) \"([0-9\.]+)\"" "\\2" SUNDIALS_VERSION ${_VERSION_DEFINE_STRING})
endif ()

set(SUNDIALS_LIBRARIES)
Expand All @@ -31,7 +31,7 @@ endforeach ()
set (SUNDIALS_INCLUDE_DIRS ${SUNDIALS_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SUNDIALS DEFAULT_MSG SUNDIALS_INCLUDE_DIRS SUNDIALS_CVODES_LIBRARY VERSION_VAR SUNDIALS_VERSION)
find_package_handle_standard_args(SUNDIALS REQUIRED_VARS SUNDIALS_INCLUDE_DIRS SUNDIALS_CVODES_LIBRARY VERSION_VAR SUNDIALS_VERSION)

mark_as_advanced (
SUNDIALS_LIBRARIES
Expand Down

0 comments on commit fad067c

Please sign in to comment.