File tree 9 files changed +42
-15
lines changed
9 files changed +42
-15
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,12 @@ ADD_DEFINITIONS(-D INFINITY_DEBUG)
131
131
132
132
# find_package(Boost REQUIRED)
133
133
find_package (Lz4 REQUIRED)
134
- find_package (jemalloc REQUIRED)
134
+
135
+ # You can disable jemalloc by passing the `-DENABLE_JEMALLOC=OFF` option to CMake.
136
+ option (ENABLE_JEMALLOC "Enable jemalloc support" ON )
137
+ if (ENABLE_JEMALLOC)
138
+ find_package (jemalloc REQUIRED)
139
+ endif ()
135
140
136
141
add_subdirectory (src)
137
142
add_subdirectory (third_party EXCLUDE_FROM_ALL )
Original file line number Diff line number Diff line change @@ -7,9 +7,12 @@ add_executable(csv_benchmark
7
7
8
8
target_link_libraries (csv_benchmark
9
9
zsv_parser
10
- jemalloc.a
11
10
)
12
11
12
+ if (ENABLE_JEMALLOC)
13
+ target_link_libraries (csv_benchmark jemalloc.a)
14
+ endif ()
15
+
13
16
target_include_directories (csv_benchmark
14
17
PUBLIC "${CMAKE_SOURCE_DIR} /third_party/zsv/include" )
15
18
target_include_directories (csv_benchmark
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ target_link_libraries(
9
9
infinity_core
10
10
sql_parser
11
11
benchmark_profiler
12
- jemalloc.a
13
12
)
14
13
15
14
add_executable (ann_ivfflat_benchmark
@@ -29,9 +28,13 @@ target_link_libraries(
29
28
fastpfor
30
29
atomic.a
31
30
lz4.a
32
- jemalloc.a
33
31
)
34
32
33
+ if (ENABLE_JEMALLOC)
34
+ target_link_libraries (hnsw_benchmark2 jemalloc.a)
35
+ target_link_libraries (ann_ivfflat_benchmark jemalloc.a)
36
+ endif ()
37
+
35
38
# add_definitions(-march=native)
36
39
# add_definitions(-msse4.2 -mfma)
37
40
# add_definitions(-mavx2 -mf16c -mpopcnt)
Original file line number Diff line number Diff line change @@ -8,9 +8,12 @@ target_link_libraries(
8
8
fst
9
9
infinity_core
10
10
benchmark_profiler
11
- jemalloc.a
12
11
)
13
12
13
+ if (ENABLE_JEMALLOC)
14
+ target_link_libraries (fst jemalloc.a)
15
+ endif ()
16
+
14
17
# add_definitions(-march=native)
15
18
# add_definitions(-msse4.2 -mfma)
16
19
# add_definitions(-mavx2 -mf16c -mpopcnt)
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ target_link_libraries(
15
15
fastpfor
16
16
lz4.a
17
17
atomic.a
18
- jemalloc.a
19
18
)
20
19
21
20
# ########################################
@@ -37,7 +36,6 @@ target_link_libraries(
37
36
fastpfor
38
37
lz4.a
39
38
atomic.a
40
- jemalloc.a
41
39
)
42
40
43
41
# query benchmark
@@ -57,7 +55,6 @@ target_link_libraries(
57
55
fastpfor
58
56
lz4.a
59
57
atomic.a
60
- jemalloc.a
61
58
)
62
59
63
60
# ########################################
@@ -79,7 +76,6 @@ target_link_libraries(
79
76
fastpfor
80
77
lz4.a
81
78
atomic.a
82
- jemalloc.a
83
79
)
84
80
85
81
# query benchmark
@@ -99,9 +95,16 @@ target_link_libraries(
99
95
fastpfor
100
96
lz4.a
101
97
atomic.a
102
- jemalloc.a
103
98
)
104
99
100
+ if (ENABLE_JEMALLOC)
101
+ target_link_libraries (infinity_benchmark jemalloc.a)
102
+ target_link_libraries (knn_import_benchmark jemalloc.a)
103
+ target_link_libraries (knn_query_benchmark jemalloc.a)
104
+ target_link_libraries (fulltext_import_benchmark jemalloc.a)
105
+ target_link_libraries (fulltext_query_benchmark jemalloc.a)
106
+ endif ()
107
+
105
108
# add_definitions(-march=native)
106
109
# add_definitions(-msse4.2 -mfma)
107
110
# add_definitions(-mavx2 -mf16c -mpopcnt)
Original file line number Diff line number Diff line change @@ -22,5 +22,8 @@ target_link_libraries(
22
22
polling_scheduler_benchmark
23
23
infinity_core
24
24
benchmark_profiler
25
- jemalloc.a
26
- )
25
+ )
26
+
27
+ if (ENABLE_JEMALLOC)
28
+ target_link_libraries (polling_scheduler_benchmark jemalloc.a)
29
+ endif ()
Original file line number Diff line number Diff line change @@ -24,9 +24,12 @@ target_link_libraries(
24
24
lz4.a
25
25
atomic.a
26
26
thrift.a
27
- jemalloc.a
28
27
)
29
28
29
+ if (ENABLE_JEMALLOC)
30
+ target_link_libraries (remote_query_benchmark jemalloc.a)
31
+ endif ()
32
+
30
33
# add_definitions(-march=native)
31
34
# add_definitions(-msse4.2 -mfma)
32
35
# add_definitions(-mavx2 -mf16c -mpopcnt)
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ endif()
28
28
include (FindPackageHandleStandardArgs)
29
29
# handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE
30
30
# if all listed variables are TRUE and the requested version matches.
31
- find_package_handle_standard_args(Jemalloc REQUIRED_VARS
31
+ find_package_handle_standard_args(jemalloc REQUIRED_VARS
32
32
JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR
33
33
VERSION_VAR JEMALLOC_VERSION)
34
34
Original file line number Diff line number Diff line change @@ -252,8 +252,12 @@ target_link_libraries(infinity
252
252
atomic.a
253
253
event.a
254
254
oatpp.a
255
- jemalloc.a
256
255
)
256
+
257
+ if (ENABLE_JEMALLOC)
258
+ target_link_libraries (infinity jemalloc.a)
259
+ endif ()
260
+
257
261
target_link_directories (infinity PUBLIC "${CMAKE_BINARY_DIR} /lib" )
258
262
target_link_directories (infinity PUBLIC "${CMAKE_BINARY_DIR} /third_party/oatpp/src/" )
259
263
You can’t perform that action at this time.
0 commit comments