feat(linux): portable build works on linux + benchmarks
This commit is contained in:
@@ -82,8 +82,8 @@ source_capable = {
|
||||
'fms': not is_windows,
|
||||
'ceed': not is_windows,
|
||||
'algoim': not meson.is_cross_build() and not is_windows and not is_wasm,
|
||||
'cuda': cuda_toolkit_available and not is_wasm and not host_machine.system() == 'darwin',
|
||||
'hip': hip_toolkit_available and not is_wasm and not host_machine.system() == 'darwin',
|
||||
'cuda': cuda_toolkit_available and not is_wasm and host_machine.system() != 'darwin',
|
||||
'hip': hip_toolkit_available and not is_wasm and host_machine.system() != 'darwin',
|
||||
'simd': simd_arch_supported and not is_wasm,
|
||||
}
|
||||
|
||||
@@ -567,6 +567,23 @@ else
|
||||
'-L' + mfem_runtime_prefix / 'lib',
|
||||
'-L' + mfem_runtime_prefix / 'lib64',
|
||||
]
|
||||
if mfem_has_cuda
|
||||
cuda_compiler_path = dependency_has_nvcc ? (
|
||||
dependency_prefix / 'bin' / 'nvcc'
|
||||
) : nvcc_program.full_path()
|
||||
cuda_root_result = run_command(
|
||||
python_build,
|
||||
'-c',
|
||||
'import os, sys; print(os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[1]))))',
|
||||
cuda_compiler_path,
|
||||
check: true,
|
||||
)
|
||||
cuda_root = cuda_root_result.stdout().strip()
|
||||
if not fs.exists(cuda_root / 'include' / 'cusparse.h')
|
||||
error('CUDA public headers were not found under ' + cuda_root + '/include.')
|
||||
endif
|
||||
bundle_compile_args += ['-I' + cuda_root / 'include']
|
||||
endif
|
||||
if dependency_prefix != '' and not wheel_carries_native_bundle
|
||||
bundle_compile_args += ['-I' + dependency_prefix / 'include']
|
||||
bundle_link_args += [
|
||||
@@ -585,7 +602,9 @@ else
|
||||
bundle_link_args += ['-lgs']
|
||||
endif
|
||||
if mfem_has_zlib
|
||||
bundle_link_args += ['-lz']
|
||||
bundle_link_args += is_wasm ? [
|
||||
mfem_runtime_prefix / 'lib' / 'libz.a',
|
||||
] : ['-lz']
|
||||
endif
|
||||
if mfem_has_sundials
|
||||
bundle_link_args += [
|
||||
|
||||
Reference in New Issue
Block a user