61
61
)
62
62
endif
63
63
64
- x86simdsortcpp_dep = declare_dependency (
65
- include_directories : include_directories (' lib' ),
66
- link_with : libsimdsort,
67
- )
68
-
69
64
pkg_mod = import (' pkgconfig' )
70
65
pkg_mod.generate(libraries : libsimdsort,
71
66
version : ' 4.0' ,
72
67
name : ' libx86simdsortcpp' ,
73
68
filebase : ' x86simdsortcpp' ,
74
69
description : ' C++ template library for high performance SIMD based sorting routines.' )
75
70
71
+ # Create a new dependency variable making it easy to use this as a subproject:
72
+ x86simdsortcpp_dep = declare_dependency (
73
+ include_directories : include_directories (' lib' ),
74
+ link_with : libsimdsort,
75
+ )
76
+
76
77
# Build test suite if option build_tests set to true
77
78
if get_option (' build_tests' )
78
79
gtest_dep = dependency (' gtest_main' , required : true , static : false )
79
80
subdir (' tests' )
80
81
testexe = executable (' testexe' ,
81
82
include_directories : [lib, utils],
82
- dependencies : gtest_dep,
83
+ dependencies : [ gtest_dep, x86simdsortcpp_dep] ,
83
84
link_whole : [libtests],
84
- link_with : libsimdsort,
85
85
)
86
86
test (' x86 simd sort tests' , testexe)
87
87
endif
@@ -94,10 +94,9 @@ if get_option('build_benchmarks')
94
94
subdir (' benchmarks' )
95
95
benchexe = executable (' benchexe' ,
96
96
include_directories : [src, lib, utils, bench],
97
- dependencies : [gbench_dep, thread_dep],
97
+ dependencies : [gbench_dep, thread_dep, x86simdsortcpp_dep ],
98
98
link_args : [' -lbenchmark_main' , ipplink],
99
99
link_whole : [libbench],
100
- link_with : libsimdsort,
101
100
)
102
101
endif
103
102
0 commit comments