Skip to content

Commit fc17936

Browse files
committed
Enable jemalloc only Linux
1 parent ca5ca5f commit fc17936

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

contrib/arrow-cmake/CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,14 @@ set(ORC_SRCS
199199
add_library(_orc ${ORC_SRCS})
200200
target_link_libraries(_orc PRIVATE
201201
ch_contrib::protobuf
202-
ch_contrib::jemalloc
203202
ch_contrib::lz4
204203
ch_contrib::snappy
205204
ch_contrib::zlib
206205
ch_contrib::zstd)
206+
if (OS_LINUX)
207+
target_link_libraries(_orc PRIVATE ch_contrib::jemalloc)
208+
endif ()
209+
207210
target_include_directories(_orc SYSTEM BEFORE PUBLIC ${ORC_INCLUDE_DIR})
208211
target_include_directories(_orc SYSTEM BEFORE PUBLIC ${ORC_BUILD_INCLUDE_DIR})
209212
target_include_directories(_orc SYSTEM PRIVATE
@@ -444,13 +447,16 @@ target_link_libraries(_arrow PRIVATE
444447
_flatbuffers
445448

446449
ch_contrib::double_conversion
447-
ch_contrib::jemalloc
448450
ch_contrib::lz4
449451
ch_contrib::snappy
450452
ch_contrib::zlib
451453
ch_contrib::zstd
452454
ch_contrib::brotli
453455
)
456+
if (OS_LINUX)
457+
target_link_libraries(_arrow PRIVATE ch_contrib::jemalloc)
458+
endif ()
459+
454460
target_link_libraries(_arrow PUBLIC _orc)
455461

456462
add_dependencies(_arrow protoc)
@@ -512,10 +518,12 @@ target_link_libraries(_parquet
512518
PUBLIC _arrow
513519
PRIVATE
514520
ch_contrib::thrift
515-
ch_contrib::jemalloc
516521
boost::headers_only
517522
boost::regex
518523
OpenSSL::Crypto OpenSSL::SSL)
524+
if (OS_LINUX)
525+
target_link_libraries(_parquet PRIVATE ch_contrib::jemalloc)
526+
endif ()
519527

520528
if (SANITIZE STREQUAL "undefined")
521529
target_compile_options(_parquet PRIVATE -fno-sanitize=undefined)

0 commit comments

Comments
 (0)