feat(initial): added portable mfem build system
This commit is contained in:
58
meson.build
Normal file
58
meson.build
Normal file
@@ -0,0 +1,58 @@
|
||||
project(
|
||||
'meson-mfem-template',
|
||||
['c', 'cpp'],
|
||||
version: '0.1.0',
|
||||
meson_version: '>=1.9.1',
|
||||
default_options: [
|
||||
'c_std=c11',
|
||||
'cpp_std=c++23',
|
||||
'warning_level=2',
|
||||
],
|
||||
)
|
||||
|
||||
python_mod = import('python')
|
||||
fs = import('fs')
|
||||
cc = meson.get_compiler('c')
|
||||
cpp = meson.get_compiler('cpp')
|
||||
platform_c_args = []
|
||||
platform_cpp_args = []
|
||||
platform_link_args = []
|
||||
if host_machine.system() == 'darwin' and get_option('macos_deployment_target') != ''
|
||||
macos_minimum_flag = '-mmacosx-version-min=' + get_option('macos_deployment_target')
|
||||
platform_c_args += [macos_minimum_flag]
|
||||
platform_cpp_args += [macos_minimum_flag]
|
||||
platform_link_args += [macos_minimum_flag]
|
||||
add_project_arguments(macos_minimum_flag, language: ['c', 'cpp'])
|
||||
add_project_link_arguments(macos_minimum_flag, language: ['c', 'cpp'])
|
||||
endif
|
||||
|
||||
subdir('build-check')
|
||||
subdir('build-config')
|
||||
subdir('include/meson_mfem_template')
|
||||
subdir('examples')
|
||||
subdir('build-python')
|
||||
subdir('tests')
|
||||
|
||||
summary(
|
||||
{
|
||||
'MFEM provider': mfem_provider,
|
||||
'dependency profile': get_option('feature_profile'),
|
||||
'allow preinstalled': get_option('allow_preinstalled'),
|
||||
'parallel MPI/Hypre': mfem_has_mpi,
|
||||
'METIS': mfem_has_metis,
|
||||
'CUDA': mfem_has_cuda,
|
||||
'HIP': mfem_has_hip,
|
||||
'OpenMP': mfem_has_openmp,
|
||||
'GSLIB': mfem_has_gslib,
|
||||
'zlib': mfem_has_zlib,
|
||||
'SUNDIALS': mfem_has_sundials,
|
||||
'libCEED': mfem_features.get('ceed'),
|
||||
'FMS': mfem_features.get('fms'),
|
||||
'Algoim': mfem_features.get('algoim'),
|
||||
'Python bindings': get_option('build_python'),
|
||||
'examples': get_option('build_examples'),
|
||||
'tests': get_option('build_tests'),
|
||||
},
|
||||
section: 'meson-mfem-template ' + meson.project_version(),
|
||||
bool_yn: true,
|
||||
)
|
||||
Reference in New Issue
Block a user