Skip to content

Commit

Permalink
use -j1 for cmake >= 3.28
Browse files Browse the repository at this point in the history
  • Loading branch information
assignUser committed Jan 16, 2024
1 parent ac50918 commit fa07594
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1005,8 +1005,13 @@ if("${MAKE}" STREQUAL "")
endif()
endif()

# Args for external projects using make.
set(MAKE_BUILD_ARGS "-j${NPROC}")
# Args for external projects using make
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.28")
#Prevent 'bad file descriptor' error
set(MAKE_BUILD_ARGS "-j1")
else()
set(MAKE_BUILD_ARGS "-j${NPROC}")
endif()

include(FetchContent)
set(FC_DECLARE_COMMON_OPTIONS)
Expand Down

0 comments on commit fa07594

Please sign in to comment.