1
1
libtargets = []
2
2
3
- # Add compile flags for OpenMP if enabled
4
- openmpflags = []
5
- if get_option (' use_openmp' )
6
- openmpflags = [' -DXSS_USE_OPENMP=true' , ' -fopenmp' ]
7
- endif
8
-
9
3
if cpp.has_argument(' -march=haswell' )
10
4
libtargets += static_library (' libavx' ,
11
5
files (
12
6
' x86simdsort-avx2.cpp' ,
13
7
),
14
8
include_directories : [src],
15
- cpp_args : [' -march=haswell' , openmpflags ],
9
+ cpp_args : [' -march=haswell' ],
16
10
gnu_symbol_visibility : ' inlineshidden' ,
11
+ dependencies : [omp_dep],
17
12
)
18
13
endif
19
14
@@ -23,8 +18,9 @@ if cpp.has_argument('-march=skylake-avx512')
23
18
' x86simdsort-skx.cpp' ,
24
19
),
25
20
include_directories : [src],
26
- cpp_args : [' -march=skylake-avx512' , openmpflags ],
21
+ cpp_args : [' -march=skylake-avx512' ],
27
22
gnu_symbol_visibility : ' inlineshidden' ,
23
+ dependencies : [omp_dep],
28
24
)
29
25
endif
30
26
@@ -34,8 +30,9 @@ if cpp.has_argument('-march=icelake-client')
34
30
' x86simdsort-icl.cpp' ,
35
31
),
36
32
include_directories : [src],
37
- cpp_args : [' -march=icelake-client' , openmpflags ],
33
+ cpp_args : [' -march=icelake-client' ],
38
34
gnu_symbol_visibility : ' inlineshidden' ,
35
+ dependencies : [omp_dep],
39
36
)
40
37
endif
41
38
@@ -45,8 +42,9 @@ if cancompilefp16
45
42
' x86simdsort-spr.cpp' ,
46
43
),
47
44
include_directories : [src],
48
- cpp_args : [' -march=sapphirerapids' , openmpflags ],
45
+ cpp_args : [' -march=sapphirerapids' ],
49
46
gnu_symbol_visibility : ' inlineshidden' ,
47
+ dependencies : [omp_dep],
50
48
)
51
49
endif
52
50
0 commit comments