Skip to content

Commit

Permalink
ARROW-6447: [C++] Allow rest of arrow_objlib to build in parallel whi…
Browse files Browse the repository at this point in the history
…le 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>
  • Loading branch information
wesm committed Sep 5, 2019
1 parent d2be6a5 commit 8cfa163
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,6 @@ if(ARROW_JEMALLOC)
INTERFACE_INCLUDE_DIRECTORIES
"${CMAKE_CURRENT_BINARY_DIR}/jemalloc_ep-prefix/src")
add_dependencies(jemalloc::jemalloc jemalloc_ep)
add_dependencies(toolchain jemalloc_ep)
endif()

# ----------------------------------------------------------------------
Expand Down
12 changes: 8 additions & 4 deletions cpp/src/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ set(ARROW_SRCS
util/utf8.cc
vendored/datetime/tz.cpp)

if(ARROW_JEMALLOC)
if("${CMAKE_GENERATOR}" STREQUAL "Ninja")
set_source_files_properties(memory_pool.cc PROPERTIES OBJECT_DEPENDS jemalloc_ep)
else()
add_dependencies(arrow_dependencies jemalloc_ep)
endif()
endif()

if(ARROW_JSON)
add_subdirectory(json)
set(ARROW_SRCS
Expand Down Expand Up @@ -205,10 +213,6 @@ if(ARROW_CUDA)
add_subdirectory(gpu)
endif()

if(ARROW_JEMALLOC AND JEMALLOC_VENDORED)
add_dependencies(arrow_dependencies jemalloc::jemalloc)
endif()

if(ARROW_WITH_BROTLI)
add_definitions(-DARROW_WITH_BROTLI)
set(ARROW_SRCS util/compression_brotli.cc ${ARROW_SRCS})
Expand Down

0 comments on commit 8cfa163

Please sign in to comment.