From fbfbe058198925c9eb4d6415207c8b33619bdd17 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 4 Jun 2015 19:33:23 +0000 Subject: [PATCH] [CMake] Fixing the check for Ninja Enabling Ninja Job Pools needs to be dependent on the CMAKE_MAKE_PROGRAM not the CMAKE_GENERATOR. There are generators (like "Sublime Text 2 - Ninja") that also generate ninja build files. Basing of the CMAKE_MAKE_PROGRAM is the best future-proof way to handle this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239076 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fc602c4631..026fe479abd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ project(LLVM) set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING "Define the maximum number of concurrent compilation jobs.") if(LLVM_PARALLEL_COMPILE_JOBS) - if(CMAKE_VERSION VERSION_LESS 3.0 OR NOT CMAKE_GENERATOR STREQUAL "Ninja") + if(CMAKE_VERSION VERSION_LESS 3.0 OR NOT CMAKE_MAKE_PROGRAM MATCHES "ninja$") message(WARNING "Job pooling is only available with Ninja generators and CMake 3.0 and later.") else() set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${LLVM_PARALLEL_COMPILE_JOBS}) @@ -43,7 +43,7 @@ endif() set(LLVM_PARALLEL_LINK_JOBS "" CACHE STRING "Define the maximum number of concurrent link jobs.") if(LLVM_PARALLEL_LINK_JOBS) - if(CMAKE_VERSION VERSION_LESS 3.0 OR NOT CMAKE_GENERATOR STREQUAL "Ninja") + if(CMAKE_VERSION VERSION_LESS 3.0 OR NOT CMAKE_MAKE_PROGRAM MATCHES "ninja$") message(WARNING "Job pooling is only available with Ninja generators and CMake 3.0 and later.") else() set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${LLVM_PARALLEL_LINK_JOBS}) -- 2.34.1