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' , stdthreadsflag],
10
+ dependencies : [omp_dep],
16
11
gnu_symbol_visibility : ' inlineshidden' ,
17
12
)
18
13
endif
@@ -23,7 +18,8 @@ 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' , stdthreadsflag],
22
+ dependencies : [omp_dep],
27
23
gnu_symbol_visibility : ' inlineshidden' ,
28
24
)
29
25
endif
@@ -34,7 +30,8 @@ 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' , stdthreadsflag],
34
+ dependencies : [omp_dep],
38
35
gnu_symbol_visibility : ' inlineshidden' ,
39
36
)
40
37
endif
@@ -45,7 +42,8 @@ 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' , stdthreadsflag],
46
+ dependencies : [omp_dep],
49
47
gnu_symbol_visibility : ' inlineshidden' ,
50
48
)
51
49
endif
0 commit comments