Skip to content

Commit

Permalink
Merge pull request #2922 from Steven-Roberts/sundials-version-check-fix
Browse files Browse the repository at this point in the history
Fix version checking for SUNDIALS
  • Loading branch information
bendudson authored Jun 24, 2024
2 parents ed69fd6 + e916f2e commit 42b9e63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/SetupBOUTThirdParty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,11 @@ if (BOUT_USE_SUNDIALS)
FetchContent_MakeAvailable(sundials)
message(STATUS "SUNDIALS done configuring")
else()
find_package(SUNDIALS 4 REQUIRED)
enable_language(C)
find_package(SUNDIALS REQUIRED)
if (SUNDIALS_VERSION VERSION_LESS 4.0.0)
message(FATAL_ERROR "SUNDIALS_VERSION 4.0.0 or newer is required. Found version ${SUNDIALS_VERSION}.")
endif()
endif()
target_link_libraries(bout++ PUBLIC SUNDIALS::nvecparallel)
target_link_libraries(bout++ PUBLIC SUNDIALS::cvode)
Expand Down

0 comments on commit 42b9e63

Please sign in to comment.