-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
41 lines (36 loc) · 1.4 KB
/
Copy pathmeson.build
File metadata and controls
41 lines (36 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# https://mesonbuild.com/
project(
'my-fantastic-simulation-code', # Project name
['c', 'cpp'], # Project type. We need a C++ compiler. The C compiler is required for MPI.
default_options : ['cpp_std=c++17'], # Yes, we need C++17, at least for constexpr
version : '0.1'
)
# Optional dependency: Eigen3 linar algebra library
# Make sure to add 'eigen' to the dependencies in your subdirectories if you
# enable this.
# eigen = dependency('eigen3', version: '>=3.4.0')
# Optional dependency: Kokkos C++ performance portability library
# Make sure to add 'kokkoscore' to the dependencies in your subdirectories if you
# enable this.
# cmake = import('cmake')
# kokkos_options = cmake.subproject_options()
# kokkos_options.add_cmake_defines({
# 'Kokkos_ENABLE_SERIAL': true, # Serial execution
# 'Kokkos_ENABLE_THREADS': true, # Threads
# 'Kokkos_ENABLE_OPENMP': false, # OpenMP support
# 'Kokkos_ENABLE_CUDA': false, # CUDA support
# 'Kokkos_ENABLE_HIP': false, # HIP support
# })
# kokkos = cmake.subproject('kokkos', options: kokkos_options)
# kokkoscore = kokkos.dependency('kokkoscore')
# Detect MPI, but make it optional
mpi = dependency('mpi', language: 'cpp', required: false)
if mpi.found()
add_project_arguments('-DWITH_MPI', language : ['c', 'cpp'])
message('MPI found')
else
message('MPI not found, disabling MPI support')
endif
subdir('src')
subdir('executables')
subdir('tests')