Skip to content

Commit

Permalink
Build Sundials static libs if shared libs disabled.
Browse files Browse the repository at this point in the history
Previously if shared libs are not enabled, then neither static nor
shared sundials libraries would be built.
  • Loading branch information
bendudson committed Sep 13, 2023
1 parent ebc0051 commit 9f6b3f7
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 @@ -231,7 +231,11 @@ if (BOUT_USE_SUNDIALS)
set(EXAMPLES_INSTALL OFF CACHE BOOL "" FORCE)
set(ENABLE_MPI ${BOUT_USE_MPI} CACHE BOOL "" FORCE)
set(ENABLE_OPENMP OFF CACHE BOOL "" FORCE)
set(BUILD_STATIC_LIBS OFF CACHE BOOL "" FORCE)
if (BUILD_SHARED_LIBS)
set(BUILD_STATIC_LIBS OFF CACHE BOOL "" FORCE)
else()
set(BUILD_STATIC_LIBS ON CACHE BOOL "" FORCE)
endif()
FetchContent_MakeAvailable(sundials)
message(STATUS "SUNDIALS done configuring")
else()
Expand Down

0 comments on commit 9f6b3f7

Please sign in to comment.