mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[cmake] Use CMAKE_GENERATOR to determine if Ninja is used
The name of the make program does not necessarily match "ninja", especially if an alternative implementation like samurai is used. Using CMAKE_GENERATOR is a more robust detection method, and is already used elsewhere in this file. Differential revision: https://reviews.llvm.org/D77091
This commit is contained in:
parent
9c3fe8e8e8
commit
b4e49c027c
@ -27,7 +27,7 @@ string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO)
|
||||
set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING
|
||||
"Define the maximum number of concurrent compilation jobs (Ninja only).")
|
||||
if(LLVM_PARALLEL_COMPILE_JOBS)
|
||||
if(NOT CMAKE_MAKE_PROGRAM MATCHES "ninja")
|
||||
if(NOT CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
message(WARNING "Job pooling is only available with Ninja generators.")
|
||||
else()
|
||||
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${LLVM_PARALLEL_COMPILE_JOBS})
|
||||
@ -37,7 +37,7 @@ endif()
|
||||
|
||||
set(LLVM_PARALLEL_LINK_JOBS "" CACHE STRING
|
||||
"Define the maximum number of concurrent link jobs (Ninja only).")
|
||||
if(CMAKE_MAKE_PROGRAM MATCHES "ninja")
|
||||
if(CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
if(NOT LLVM_PARALLEL_LINK_JOBS AND uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
|
||||
message(STATUS "ThinLTO provides its own parallel linking - limiting parallel link jobs to 2.")
|
||||
set(LLVM_PARALLEL_LINK_JOBS "2")
|
||||
|
Loading…
Reference in New Issue
Block a user