feat(serif): utility headers (e.g. config, version, etc...)

This commit is contained in:
2026-11-09 13:45:57 -05:00
parent fff2b55832
commit e9a9fc7653
4 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
#pragma once
#define SERIF_VERSION @SERIF_VERSION@
#define SERIF_VERSION_MAJOR @SERIF_VERSION_MAJOR@
#define SERIF_BUILD_COMPILER @SERIF_BUILD_COMPILER@
#define SERIF_BUILD_SYSTEM @SERIF_BUILD_SYSTEM@
#define SERIF_BUILD_ARCHITECTURE @SERIF_BUILD_ARCHITECTURE@
#define SERIF_BUILD_TYPE @SERIF_BUILD_TYPE@
#define SERIF_MFEM_BUILD_VERSION @SERIF_MFEM_BUILD_VERSION@

View File

@@ -0,0 +1,15 @@
serif_configuration = configuration_data()
serif_configuration.set_quoted('SERIF_VERSION', meson.project_version())
serif_configuration.set('SERIF_VERSION_MAJOR', meson.project_version().split('.')[0])
serif_configuration.set_quoted('SERIF_BUILD_COMPILER', cpp.get_id() + ' ' + cpp.version())
serif_configuration.set_quoted('SERIF_BUILD_SYSTEM', host_machine.system())
serif_configuration.set_quoted('SERIF_BUILD_ARCHITECTURE', host_machine.cpu_family())
serif_configuration.set_quoted('SERIF_BUILD_TYPE', get_option('buildtype'))
serif_configuration.set_quoted('SERIF_MFEM_BUILD_VERSION', mfem_dep.version())
configure_file(
input: 'config.hpp.in',
output: 'config.hpp',
configuration: serif_configuration,
install_dir: get_option('includedir') / 'serif',
)

View File

@@ -0,0 +1,7 @@
#pragma once
#include "serif/backend/mfem/runtime.hpp"
namespace serif {
using backend::mfem::initialize;
}

View File

@@ -0,0 +1,11 @@
#pragma once
#include "serif/backend/mfem/types.hpp"
namespace serif {
// MFEM is the supported backend. Select native types here; aliases introduce no storage or conversions.
using Vector = backend::mfem::Vector;
using DenseMatrix = backend::mfem::DenseMatrix;
using SparseMatrix = backend::mfem::SparseMatrix;
using LinearOperator = backend::mfem::LinearOperator;
}