mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request 'cmake: Use job pool feature to limit concurrent jobs' (#314) from asymptotically/wownero:cmake-job-pools into master
Reviewed-on: https://git.wownero.com/wownero/wownero/pulls/314
This commit is contained in:
commit
04d6c39149
1 changed files with 15 additions and 0 deletions
|
@ -55,6 +55,21 @@ else()
|
||||||
message(STATUS "ccache deselected")
|
message(STATUS "ccache deselected")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Job pool feature requires Ninja.
|
||||||
|
if (${CMAKE_VERSION} VERSION_GREATER "3.0.0")
|
||||||
|
set(WOWNERO_PARALLEL_COMPILE_JOBS "" CACHE STRING "The maximum number of concurrent compilation jobs.")
|
||||||
|
if (WOWNERO_PARALLEL_COMPILE_JOBS)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${WOWNERO_PARALLEL_COMPILE_JOBS})
|
||||||
|
set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set(WOWNERO_PARALLEL_LINK_JOBS "" CACHE STRING "The maximum number of concurrent link jobs.")
|
||||||
|
if (WOWNERO_PARALLEL_LINK_JOBS)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${WOWNERO_PARALLEL_LINK_JOBS})
|
||||||
|
set(CMAKE_JOB_POOL_LINK link_job_pool)
|
||||||
|
endif ()
|
||||||
|
endif()
|
||||||
|
|
||||||
enable_language(C ASM)
|
enable_language(C ASM)
|
||||||
|
|
||||||
function (die msg)
|
function (die msg)
|
||||||
|
|
Loading…
Reference in a new issue