feat(initial): added portable mfem build system
This commit is contained in:
35
examples/meson.build
Normal file
35
examples/meson.build
Normal file
@@ -0,0 +1,35 @@
|
||||
example_deps = [mfem_dep, template_include_dep]
|
||||
example_build_rpath = mfem_runtime_prefix == '' ? '' : mfem_runtime_prefix / 'lib'
|
||||
example_install_rpath = ''
|
||||
if mfem_runtime_prefix != '' and not is_windows and not is_wasm
|
||||
example_install_rpath = host_machine.system() == 'darwin' ? '@loader_path/../lib' : '$ORIGIN/../lib'
|
||||
endif
|
||||
|
||||
serial_example = []
|
||||
parallel_example = []
|
||||
|
||||
if get_option('build_examples')
|
||||
serial_example = executable(
|
||||
'mfem-serial-poisson',
|
||||
'serial_poisson.cpp',
|
||||
dependencies: example_deps,
|
||||
override_options: ['cpp_std=' + mfem_consumer_cpp_std],
|
||||
build_rpath: example_build_rpath,
|
||||
install_rpath: example_install_rpath,
|
||||
install: true,
|
||||
install_tag: 'examples',
|
||||
)
|
||||
|
||||
if mfem_has_mpi
|
||||
parallel_example = executable(
|
||||
'mfem-parallel-hypre',
|
||||
'parallel_hypre.cpp',
|
||||
dependencies: example_deps,
|
||||
override_options: ['cpp_std=' + mfem_consumer_cpp_std],
|
||||
build_rpath: example_build_rpath,
|
||||
install_rpath: example_install_rpath,
|
||||
install: true,
|
||||
install_tag: 'examples',
|
||||
)
|
||||
endif
|
||||
endif
|
||||
Reference in New Issue
Block a user