Skip to content

Commit 50299b7

Browse files
authored
Merge pull request #1102 from su2code/fix_meson_init
Add an option to meson for extra dependencies (to fix mpich and lapack issues)
2 parents 9cf9d5d + 8f05301 commit 50299b7

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

Common/include/parallelization/vectorization.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
#include <initializer_list>
3333
#include <algorithm>
3434
#include <cmath>
35+
#ifdef __SSE2__
36+
#include "x86intrin.h"
37+
#endif
3538

3639
namespace simd {
3740

@@ -163,7 +166,6 @@ constexpr auto abs_mask_d = 0x7FFFFFFFFFFFFFFFL;
163166
constexpr auto sign_mask_d = 0x8000000000000000L;
164167

165168
#ifdef __SSE2__
166-
#include "x86intrin.h"
167169
/*!
168170
* Create specialization for array of 2 doubles (this should be always available).
169171
*/

meson.build

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ elif get_option('enable-openblas')
156156

157157
endif
158158

159+
extra_deps = get_option('extra-deps').split(',')
160+
foreach dep : extra_deps
161+
if dep != ''
162+
su2_deps += dependency(dep)
163+
endif
164+
endforeach
165+
159166
catch2_dep = declare_dependency(include_directories: 'externals/catch2/')
160167

161168
# compile common library

meson_options.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ option('blas-name', type : 'string', value : 'openblas', description: 'name of t
1313
option('enable-pastix', type : 'boolean', value : false, description: 'enable PaStiX support')
1414
option('pastix_root', type : 'string', value : 'externals/pastix/', description: 'PaStiX base directory')
1515
option('scotch_root', type : 'string', value : 'externals/scotch/', description: 'Scotch base directory')
16-
option('custom-mpi', type : 'boolean', value : false, description: 'Use custom mpi include and library path from env variables')
17-
option('enable-tests', type : 'boolean', value : false, description: 'Compile Unit Tests')
18-
option('enable-mixedprec', type : 'boolean', value : false, description: 'Use single precision floating point arithmetic for sparse algebra')
16+
option('custom-mpi', type : 'boolean', value : false, description: 'enable MPI assuming the compiler and/or env vars give the correct include dirs and linker args.')
17+
option('enable-tests', type : 'boolean', value : false, description: 'compile Unit Tests')
18+
option('enable-mixedprec', type : 'boolean', value : false, description: 'use single precision floating point arithmetic for sparse algebra')
19+
option('extra-deps', type : 'string', value : '', description: 'comma-separated list of extra (custom) dependencies to add for compilation')

0 commit comments

Comments
 (0)