Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
7fde98e
First attempt at a package to build BOUT++ independently from Hermes-3.
oparry-ukaea Jul 17, 2025
fa6fefc
Use a patch from Tom Body's Docker config to work around CMake not fi…
oparry-ukaea Jul 17, 2025
d2c377d
Tidy up boutpp package and add dependencies for +python variant.
oparry-ukaea Jul 17, 2025
ab2cbb2
Tidy up hermes-3 package and remove old variants.
oparry-ukaea Jul 17, 2025
36ec207
Add variants to cover more bout cmake options. Match the default valu…
oparry-ukaea Jul 22, 2025
7262147
Remove temporary cmake patch (fixed on bout/master at f264632638c1d1a…
oparry-ukaea Jul 28, 2025
3117f9b
Remove old petsc, sundials variants
oparry-ukaea Nov 26, 2025
68528bc
Make Python a 'simple dependency'.
oparry-ukaea Nov 26, 2025
6430d09
Add pass-through variants for PETSc.
oparry-ukaea Nov 26, 2025
fec5011
Fix logic for setting BOUT_USE_PETSC.
oparry-ukaea Nov 26, 2025
fec3d5d
Fix PETSc variant passthrough.
oparry-ukaea Nov 26, 2025
dec4d50
Merge branch 'main' into boutpp-package
oparry-ukaea Dec 2, 2025
cc2341e
Set boutpp maintainer.
oparry-ukaea Dec 19, 2025
d684e8e
black format boutpp package file.
oparry-ukaea Dec 19, 2025
6946d90
Disable boutpp strumpack variant for now.
oparry-ukaea Dec 19, 2025
a62e2fe
Set minimum PETSc version as 3.23 for boutpp.
oparry-ukaea Jan 20, 2026
0d904d5
Limit SUNDIALS to versions between 2.6 and 6.7.0 for boutpp.
oparry-ukaea Jan 20, 2026
e086cd3
Use tags rather than release branches for boutpp versions. Remove ver…
oparry-ukaea Jan 20, 2026
5877277
Remove unnecessary "pvode" variant.
oparry-ukaea Jan 20, 2026
56e25d6
Associate boutpp@develop with the 'next' branch.
oparry-ukaea Jan 20, 2026
5ded2d9
Merge branch 'main' into boutpp-package
oparry-ukaea Jan 20, 2026
4c42f61
Fix typo.
oparry-ukaea Jan 20, 2026
23234fd
Fix logic for setting BOUT_USE_PETSC.
oparry-ukaea Jan 20, 2026
477cc99
Limit PETSc to versions between 3.7 and 3.22 for boutpp.
oparry-ukaea Jan 20, 2026
0eed359
Better comments in boutpp/package.py
oparry-ukaea Jan 20, 2026
9a70329
black format
oparry-ukaea Jan 21, 2026
a8977c0
Set different max PETSc version for boutpp@5.0.0 .
oparry-ukaea Jan 21, 2026
41b4d07
Patch boutpp third party CMake.
oparry-ukaea Jan 21, 2026
5e21803
Always set -DBOUT_IGNORE_CONDA_ENV=ON.
oparry-ukaea Jan 21, 2026
05f2ae7
Remove commented code.
oparry-ukaea Jan 21, 2026
d349c55
Always set -DBOUT_USE_PVODE=ON.
oparry-ukaea Jan 21, 2026
89efd34
Remove the mumps, strumpack and superlu-dist boutpp variants, leaving…
oparry-ukaea Jan 21, 2026
81c126d
Add missing slepc dependency.
oparry-ukaea Jan 21, 2026
192aca2
Add comments to document the fixed CMake args used in boutpp.
oparry-ukaea Jan 22, 2026
73da644
Don't force -DBOUT_GENERATE_FIELDOPS=OFF in boutpp.
oparry-ukaea Jan 22, 2026
fd7c28e
System UUID true by default
mikekryjak Jan 22, 2026
53e9edc
More robust way to specify PETSc version restrictions.
oparry-ukaea Jan 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
225 changes: 225 additions & 0 deletions packages/boutpp/fix_thirdparty_cmake_v5.0.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
diff --git a/cmake/FindnetCDF.cmake b/cmake/FindnetCDF.cmake
index 824fb4a3c2..42dae86b14 100644
--- a/cmake/FindnetCDF.cmake
+++ b/cmake/FindnetCDF.cmake
@@ -3,139 +3,138 @@
#
# Find the netCDF IO library
#
-# This module uses the ``nc-config`` helper script as a hint for the
-# location of the netCDF libraries. It should be in your PATH.
+# This module uses the ``nc-config`` helper script as a hint for the location of
+# the netCDF libraries. It should be in your PATH.
#
# This module will define the following variables:
#
# ::
#
-# netCDF_FOUND - true if netCDF was found
-# netCDF_VERSION - netCDF version in format Major.Minor.Release
-# netCDF_INCLUDE_DIRS - Location of the netCDF includes
-# netCDF_LIBRARIES - Required libraries
+# netCDF_FOUND - true if netCDF was found netCDF_VERSION - netCDF version in
+# format Major.Minor.Release netCDF_INCLUDE_DIRS - Location of the netCDF
+# includes netCDF_LIBRARIES - Required libraries
#
# This module will also export the ``netCDF::netcdf`` target.
#
# You can also set the following variables:
#
-# ``netCDF_ROOT``
-# Specify the path to the netCDF installation to use
+# ``netCDF_ROOT`` Specify the path to the netCDF installation to use
#
-# ``netCDF_DEBUG``
-# Set to TRUE to get extra debugging output
+# ``netCDF_DEBUG`` Set to TRUE to get extra debugging output

include(BOUT++functions)
include(CMakePrintHelpers)

+if(NOT netCDF_ROOT AND EXISTS "${BOUT_USE_NETCDF}")
+ set(netCDF_ROOT "${BOUT_USE_NETCDF}")
+endif()
+
+enable_language(C)
find_package(netCDF QUIET CONFIG)

-if (netCDF_FOUND)
+if(netCDF_FOUND)
message(STATUS "netCDF CONFIG found")
set(netCDF_FOUND TRUE)
- if (NOT TARGET netCDF::netcdf)
+ if(NOT TARGET netCDF::netcdf)
bout_add_library_alias(netCDF::netcdf netcdf)
endif()
- if (netCDF_DEBUG)
- cmake_print_properties(TARGETS netcdf PROPERTIES LOCATION VERSION)
- endif (netCDF_DEBUG)
+ if(netCDF_DEBUG)
+ cmake_print_properties(TARGETS netcdf PROPERTIES LOCATION VERSION)
+ endif(netCDF_DEBUG)
return()
endif()

-find_program(NC_CONFIG "nc-config"
+find_program(
+ NC_CONFIG "nc-config"
PATHS "${netCDF_ROOT}"
PATH_SUFFIXES bin
DOC "Path to netCDF C config helper"
- NO_DEFAULT_PATH
- )
+ NO_DEFAULT_PATH)

-find_program(NC_CONFIG "nc-config"
- DOC "Path to netCDF C config helper"
- )
+find_program(NC_CONFIG "nc-config" DOC "Path to netCDF C config helper")

get_filename_component(NC_CONFIG_TMP "${NC_CONFIG}" DIRECTORY)
get_filename_component(NC_CONFIG_LOCATION "${NC_CONFIG_TMP}" DIRECTORY)
-if (netCDF_DEBUG)
+if(netCDF_DEBUG)
message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " NC_CONFIG_LOCATION = ${NC_CONFIG_LOCATION}"
- " netCDF_ROOT = ${netCDF_ROOT}")
+ " NC_CONFIG_LOCATION = ${NC_CONFIG_LOCATION}"
+ " netCDF_ROOT = ${netCDF_ROOT}")
endif()

bout_inspect_netcdf_config(NC_HINTS_INCLUDE_DIR "${NC_CONFIG}" "--includedir")
bout_inspect_netcdf_config(NC_HINTS_PREFIX "${NC_CONFIG}" "--prefix")

-find_path(netCDF_C_INCLUDE_DIR
+find_path(
+ netCDF_C_INCLUDE_DIR
NAMES netcdf.h
DOC "netCDF C include directories"
- HINTS
- "${NC_HINTS_INCLUDE_DIR}"
- "${NC_HINTS_PREFIX}"
- "${NC_CONFIG_LOCATION}"
- PATH_SUFFIXES
- "include"
- )
-if (netCDF_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " netCDF_C_INCLUDE_DIR = ${netCDF_C_INCLUDE_DIR}"
- " NC_HINTS_INCLUDE_DIR = ${NC_HINTS_INCLUDE_DIR}"
- " NC_HINTS_PREFIX = ${NC_HINTS_PREFIX}"
- )
+ HINTS "${NC_HINTS_INCLUDE_DIR}" "${NC_HINTS_PREFIX}" "${NC_CONFIG_LOCATION}"
+ PATH_SUFFIXES "include")
+if(netCDF_DEBUG)
+ message(
+ STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " netCDF_C_INCLUDE_DIR = ${netCDF_C_INCLUDE_DIR}"
+ " NC_HINTS_INCLUDE_DIR = ${NC_HINTS_INCLUDE_DIR}"
+ " NC_HINTS_PREFIX = ${NC_HINTS_PREFIX}")
endif()
mark_as_advanced(netCDF_C_INCLUDE_DIR)

-find_library(netCDF_C_LIBRARY
+find_library(
+ netCDF_C_LIBRARY
NAMES netcdf
DOC "netCDF C library"
- HINTS
- "${NC_HINTS_INCLUDE_DIR}"
- "${NC_HINTS_PREFIX}"
- "${NC_CONFIG_LOCATION}"
- PATH_SUFFIXES
- "lib" "lib64"
- )
-if (netCDF_DEBUG)
- message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
- " netCDF_C_LIBRARY = ${netCDF_C_LIBRARY}"
- " NC_HINTS_INCLUDE_DIR = ${NC_HINTS_INCLUDE_DIR}"
- " NC_HINTS_PREFIX = ${NC_HINTS_PREFIX}"
- )
+ HINTS "${NC_HINTS_INCLUDE_DIR}" "${NC_HINTS_PREFIX}" "${NC_CONFIG_LOCATION}"
+ PATH_SUFFIXES "lib" "lib64")
+if(netCDF_DEBUG)
+ message(
+ STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+ " netCDF_C_LIBRARY = ${netCDF_C_LIBRARY}"
+ " NC_HINTS_INCLUDE_DIR = ${NC_HINTS_INCLUDE_DIR}"
+ " NC_HINTS_PREFIX = ${NC_HINTS_PREFIX}")
endif()
mark_as_advanced(netCDF_C_LIBRARY)

-if (netCDF_C_INCLUDE_DIR)
+if(netCDF_C_INCLUDE_DIR)
file(STRINGS "${netCDF_C_INCLUDE_DIR}/netcdf_meta.h" _netcdf_version_lines
- REGEX "#define[ \t]+NC_VERSION_(MAJOR|MINOR|PATCH|NOTE)")
- string(REGEX REPLACE ".*NC_VERSION_MAJOR *\([0-9]*\).*" "\\1" _netcdf_version_major "${_netcdf_version_lines}")
- string(REGEX REPLACE ".*NC_VERSION_MINOR *\([0-9]*\).*" "\\1" _netcdf_version_minor "${_netcdf_version_lines}")
- string(REGEX REPLACE ".*NC_VERSION_PATCH *\([0-9]*\).*" "\\1" _netcdf_version_patch "${_netcdf_version_lines}")
- string(REGEX REPLACE ".*NC_VERSION_NOTE *\"\([^\"]*\)\".*" "\\1" _netcdf_version_note "${_netcdf_version_lines}")
- if (NOT _netcdf_version_note STREQUAL "")
+ REGEX "#define[ \t]+NC_VERSION_(MAJOR|MINOR|PATCH|NOTE)")
+ string(REGEX REPLACE ".*NC_VERSION_MAJOR *\([0-9]*\).*" "\\1"
+ _netcdf_version_major "${_netcdf_version_lines}")
+ string(REGEX REPLACE ".*NC_VERSION_MINOR *\([0-9]*\).*" "\\1"
+ _netcdf_version_minor "${_netcdf_version_lines}")
+ string(REGEX REPLACE ".*NC_VERSION_PATCH *\([0-9]*\).*" "\\1"
+ _netcdf_version_patch "${_netcdf_version_lines}")
+ string(REGEX REPLACE ".*NC_VERSION_NOTE *\"\([^\"]*\)\".*" "\\1"
+ _netcdf_version_note "${_netcdf_version_lines}")
+ if(NOT _netcdf_version_note STREQUAL "")
# Make development version compare higher than any patch level
set(_netcdf_version_note ".99")
endif()
- set(netCDF_VERSION "${_netcdf_version_major}.${_netcdf_version_minor}.${_netcdf_version_patch}${_netcdf_version_note}")
+ set(netCDF_VERSION
+ "${_netcdf_version_major}.${_netcdf_version_minor}.${_netcdf_version_patch}${_netcdf_version_note}"
+ )
unset(_netcdf_version_major)
unset(_netcdf_version_minor)
unset(_netcdf_version_patch)
unset(_netcdf_version_note)
unset(_netcdf_version_lines)
-endif ()
+endif()

include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(netCDF
+find_package_handle_standard_args(
+ netCDF
REQUIRED_VARS netCDF_C_LIBRARY netCDF_C_INCLUDE_DIR
VERSION_VAR netCDF_VERSION)

-if (netCDF_FOUND)
+if(netCDF_FOUND)
set(netCDF_INCLUDE_DIR "${netCDF_C_INCLUDE_DIR}")
set(netCDF_INCLUDE_DIRS "${netCDF_C_INCLUDE_DIR}")
set(netCDF_LIBRARIES "${netCDF_C_LIBRARY}")

- if (NOT TARGET netCDF::netcdf)
+ if(NOT TARGET netCDF::netcdf)
add_library(netCDF::netcdf UNKNOWN IMPORTED)
- set_target_properties(netCDF::netcdf PROPERTIES
- IMPORTED_LOCATION "${netCDF_C_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${netCDF_C_INCLUDE_DIR}"
- )
- endif ()
-endif ()
+ set_target_properties(
+ netCDF::netcdf
+ PROPERTIES IMPORTED_LOCATION "${netCDF_C_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${netCDF_C_INCLUDE_DIR}")
+ endif()
+endif()
diff --git a/cmake/SetupBOUTThirdParty.cmake b/cmake/SetupBOUTThirdParty.cmake
index c04cc98a69..9ee32c7214 100644
--- a/cmake/SetupBOUTThirdParty.cmake
+++ b/cmake/SetupBOUTThirdParty.cmake
@@ -213,6 +213,7 @@ option(BOUT_DOWNLOAD_SUNDIALS "Download and build SUNDIALS" OFF)
cmake_dependent_option(BOUT_USE_SUNDIALS "Enable support for SUNDIALS time solvers" OFF
"NOT BOUT_DOWNLOAD_SUNDIALS" ON)
if (BOUT_USE_SUNDIALS)
+ enable_language(C)
if (BOUT_DOWNLOAD_SUNDIALS)
message(STATUS "Downloading and configuring SUNDIALS")
include(FetchContent)
24 changes: 24 additions & 0 deletions packages/boutpp/fix_thirdparty_cmake_v5.1.x.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/cmake/FindnetCDF.cmake b/cmake/FindnetCDF.cmake
index 393c57549b..361095954e 100644
--- a/cmake/FindnetCDF.cmake
+++ b/cmake/FindnetCDF.cmake
@@ -32,6 +32,7 @@ if (NOT netCDF_ROOT AND EXISTS "${BOUT_USE_NETCDF}")
set(netCDF_ROOT "${BOUT_USE_NETCDF}")
endif()

+enable_language(C)
find_package(netCDF QUIET CONFIG)

if (netCDF_FOUND)
diff --git a/cmake/SetupBOUTThirdParty.cmake b/cmake/SetupBOUTThirdParty.cmake
index 78dfc6b56e..37af2337d9 100644
--- a/cmake/SetupBOUTThirdParty.cmake
+++ b/cmake/SetupBOUTThirdParty.cmake
@@ -233,6 +233,7 @@ option(BOUT_DOWNLOAD_SUNDIALS "Download and build SUNDIALS" OFF)
cmake_dependent_option(BOUT_USE_SUNDIALS "Enable support for SUNDIALS time solvers" OFF
"NOT BOUT_DOWNLOAD_SUNDIALS" ON)
if (BOUT_USE_SUNDIALS)
+ enable_language(C)
if (BOUT_DOWNLOAD_SUNDIALS)
message(STATUS "Downloading and configuring SUNDIALS")
include(FetchContent)
Loading