This is an automated email from the ASF dual-hosted git repository.

assignuser pushed a commit to branch maint-14.0.2-cran
in repository https://gitbox.apache.org/repos/asf/arrow.git

commit a97e4c6cd01969e7c53a36e30a7846941f18eca8
Author: Jacob Wujciak-Jens <ja...@wujciak.de>
AuthorDate: Thu Jan 11 18:12:59 2024 +0100

    GH-39549: [C++] Pass -jN to make in external projects (#39550)
    
    ### Rationale for this change
    
    Previous issues with sub-make fragility are no longer an issue with our new 
minimum CMake version 3.16.
    ### What changes are included in this PR?
    
    Remove special casing from jemalloc, pass -jN to all make based eps.
    
    ### Are these changes tested?
    CI
    * Closes: #39549
    
    Authored-by: Jacob Wujciak-Jens <ja...@wujciak.de>
    Signed-off-by: Jacob Wujciak-Jens <ja...@wujciak.de>
---
 cpp/cmake_modules/ThirdpartyToolchain.cmake | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 27190f7081..dd2742833b 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -994,14 +994,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)
 
@@ -2027,10 +2021,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}")

Reply via email to