Skip to content

Commit

Permalink
pass -j to Make in external Projects
Browse files Browse the repository at this point in the history
  • Loading branch information
assignUser committed Jan 10, 2024
1 parent 4e101f0 commit 581f538
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1005,14 +1005,8 @@ if("${MAKE}" STREQUAL "")
endif()
endif()

# Using make -j in sub-make is fragile
# see discussion https://github.com/apache/arrow/pull/2779
if(${CMAKE_GENERATOR} MATCHES "Makefiles")
set(MAKE_BUILD_ARGS "")
else()
# limit the maximum number of jobs for ninja
set(MAKE_BUILD_ARGS "-j${NPROC}")
endif()
# Args for external projects using make.
set(MAKE_BUILD_ARGS "-j${NPROC}")

include(FetchContent)
set(FC_DECLARE_COMMON_OPTIONS)
Expand Down Expand Up @@ -2042,10 +2036,6 @@ macro(build_jemalloc)
endif()

set(JEMALLOC_BUILD_COMMAND ${MAKE} ${MAKE_BUILD_ARGS})
# Paralleism for Make fails with CMake > 3.28 see #39517
if(${CMAKE_GENERATOR} MATCHES "Makefiles")
list(APPEND JEMALLOC_BUILD_COMMAND "-j1")
endif()

if(CMAKE_OSX_SYSROOT)
list(APPEND JEMALLOC_BUILD_COMMAND "SDKROOT=${CMAKE_OSX_SYSROOT}")
Expand Down

0 comments on commit 581f538

Please sign in to comment.