Skip to content

Commit 8cfa163

Browse files
committed
ARROW-6447: [C++] Allow rest of arrow_objlib to build in parallel while memory_pool.cc is waiting on jemalloc_ep
Using OBJECT_DEPENDS like this seems to only work with the Ninja build generator with CMake 3.12.x, which is probably a bug. With Makefiles we fall back to the old strategy of blocking on the completion of jemalloc_ep. Closes #5281 from wesm/ARROW-6447 and squashes the following commits: 7e46ff4 <Wes McKinney> Only use OBJECT_DEPENDS with Ninja build generator c93f311 <Wes McKinney> cmake-format eb52965 <Wes McKinney> Add jemalloc_ep dependency only on memory_pool.cc Authored-by: Wes McKinney <wesm+git@apache.org> Signed-off-by: Wes McKinney <wesm+git@apache.org>
1 parent d2be6a5 commit 8cfa163

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,6 @@ if(ARROW_JEMALLOC)
14081408
INTERFACE_INCLUDE_DIRECTORIES
14091409
"${CMAKE_CURRENT_BINARY_DIR}/jemalloc_ep-prefix/src")
14101410
add_dependencies(jemalloc::jemalloc jemalloc_ep)
1411-
add_dependencies(toolchain jemalloc_ep)
14121411
endif()
14131412

14141413
# ----------------------------------------------------------------------

cpp/src/arrow/CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ set(ARROW_SRCS
145145
util/utf8.cc
146146
vendored/datetime/tz.cpp)
147147

148+
if(ARROW_JEMALLOC)
149+
if("${CMAKE_GENERATOR}" STREQUAL "Ninja")
150+
set_source_files_properties(memory_pool.cc PROPERTIES OBJECT_DEPENDS jemalloc_ep)
151+
else()
152+
add_dependencies(arrow_dependencies jemalloc_ep)
153+
endif()
154+
endif()
155+
148156
if(ARROW_JSON)
149157
add_subdirectory(json)
150158
set(ARROW_SRCS
@@ -205,10 +213,6 @@ if(ARROW_CUDA)
205213
add_subdirectory(gpu)
206214
endif()
207215

208-
if(ARROW_JEMALLOC AND JEMALLOC_VENDORED)
209-
add_dependencies(arrow_dependencies jemalloc::jemalloc)
210-
endif()
211-
212216
if(ARROW_WITH_BROTLI)
213217
add_definitions(-DARROW_WITH_BROTLI)
214218
set(ARROW_SRCS util/compression_brotli.cc ${ARROW_SRCS})

0 commit comments

Comments
 (0)