[llvm] r239076 - [CMake] Fixing the check for Ninja
Chris Bieneman
beanz at apple.com
Thu Jun 4 12:33:24 PDT 2015
Author: cbieneman
Date: Thu Jun 4 14:33:23 2015
New Revision: 239076
URL: http://llvm.org/viewvc/llvm-project?rev=239076&view=rev
Log:
[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.
Modified:
llvm/trunk/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=239076&r1=239075&r2=239076&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Jun 4 14:33:23 2015
@@ -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})
More information about the llvm-commits
mailing list