Files
MeanField_SERiF/src/meson.build

61 lines
2.5 KiB
Meson

include_dir = include_directories('include')
# TODO: Really we should make a dependency graph between the various modules
# and then make sublibraries for each module that build themselves in the correct order
# and then link together at the end.
serif_sources = files(
'lib/serif/discretization/domain/mesh/topology.cpp',
'lib/serif/discretization/domain/schema/validation/results.cpp',
'lib/serif/discretization/quadrature/policy.cpp',
'lib/serif/eos/models/polytropic.cpp',
'lib/serif/mapping/compactification/kelvin.cpp',
'lib/serif/mapping/data.cpp',
'lib/serif/mapping/domain_mapper.cpp',
'lib/serif/mapping/transformations.cpp',
'lib/serif/mapping/volume_cache.cpp',
'lib/serif/mapping/evaluator.cpp',
'lib/serif/mapping/coefficients.cpp'
)
serif_lib = library(
'serif',
serif_sources,
include_directories: include_dir,
dependencies: [mfem_dep, nameof_dep, magic_enum_dep],
build_rpath: mfem_runtime_prefix == '' ? '' : mfem_runtime_prefix / 'lib',
)
serif_dep = declare_dependency(
include_directories: include_dir,
link_with: serif_lib,
dependencies: [mfem_dep, nameof_dep, magic_enum_dep],
)
if get_option('build_checks')
checks_srcs = files(
'compile_time_checks/serif/discretization/forms/forms.cpp',
'compile_time_checks/serif/discretization/forms/operands.cpp',
'compile_time_checks/serif/discretization/blocks/fields.cpp',
'compile_time_checks/serif/discretization/quadrature/backend/mfem/mfem_resolver.cpp',
)
# We only make this a lib since we really dont need it to link to anything latter. This is just compiled
# to exercise the compile time checks of the type invariants in serif
# Note this will not produce any executable binaries as there is no run time code, we are purley validating
# that compilation passes for a series of checks that assert type invariants
# These checks should be expanded in the future given how much of SERiF is compile time validated.
# also note we intentionally do not link to any SERiF library here. Compile time invariants
# generally must live in a header file, therfore an important part of the compile time checks
# is that they are self contained.
# Do not add a dependency on serif_dep or link with serif_lib.
# if something seems to break due to lack of linking it means that a bug was introduced.
serif_checks_lib = static_library(
'serif_checks',
checks_srcs,
include_directories: [include_dir, nameof_include_dir, magic_enum_include] ,
dependencies: [mfem_dep, magic_enum_dep],
)
endif