build(meson): updated build system. Note that this build system should be able to bring in MFEM and all needed deps automatically (tested on ubuntu, fedora, and macos)

This commit is contained in:
2026-11-09 13:50:06 -05:00
parent 811bbd9694
commit 829e53d56e
6 changed files with 3155 additions and 182 deletions

View File

@@ -3,7 +3,7 @@ option('feature_profile', type: 'combo', choices: ['minimal', 'portable', 'full'
option('build_python', type: 'boolean', value: false, description: 'Build the nanobind Python extension and install native assets inside the Python package.')
option('build_tests', type: 'boolean', value: true, description: 'Register serial, parallel, and Python smoke tests when applicable.')
option('build_checks', type: 'boolean', value: true, description: 'Build the compile-time checks for SERiF type invariants.')
option('sandbox_expected_errors', type: 'array', value: ['finite_sandbox:NON_FINITE_VALUE_ERROR', 'quadrature_sandbox:INVALID_QUADRATURE_ORDER'], description: 'Intentional error examples, as sandbox_name:ERROR_CODE. Other sandboxes must exit successfully.')
option('sandbox_expected_errors', type: 'array', value: ['finite_sandbox:NON_FINITE_VALUE_ERROR', 'quadrature_sandbox:INVALID_QUADRATURE_ORDER', 'eos_sandbox:EOS_OUTSIDE_DOMAIN'], description: 'Intentional error examples, as sandbox_name:ERROR_CODE. Other sandboxes must exit successfully.')
option('install_mfem', type: 'boolean', value: true, description: 'Install the source-built MFEM bundle and its runtime dependencies.')
option('dependency_prefix', type: 'string', value: '', description: 'Explicit prefix containing optional TPLs. Used even when allow_preinstalled=false.')
option('jobs', type: 'integer', min: 1, max: 1024, value: 4, description: 'Parallel jobs for the CMake/Make source bundle.')
@@ -13,6 +13,8 @@ option('mfem_precision', type: 'combo', choices: ['double', 'single'], value: 'd
option('python_install_native', type: 'boolean', value: true, description: 'Install MFEM headers, CMake/pkg-config data, and runtime libraries under the Python package.')
option('macos_deployment_target', type: 'string', value: '', description: 'Minimum macOS version for native artifacts (15.0 supports C++23 std::print); ignored on other systems. Empty uses the toolchain default.')
option('sparse_direct', type: 'combo', choices: ['auto', 'accelerate', 'umfpack', 'none'], value: 'auto', description: 'Backend of the SparseDirect preconditioner inverse. auto: Accelerate on macOS, else UMFPACK when found, else none (minimal profile: none). Explicit choices are required to be available. none keeps the strategy but makes its preparation fail.')
option('magic_enum_hash', type: 'boolean', value: false, description: 'Enable hash support in magic_enum. This is a compile-time option that enables std::hash for magic_enum types.')
option('mfem_mpi', type: 'feature', value: 'auto', description: 'MPI parallel MFEM; implies Hypre.')