diff options
| author | Chris Bieneman <beanz@apple.com> | 2015-06-04 15:33:08 +0000 |
|---|---|---|
| committer | Chris Bieneman <beanz@apple.com> | 2015-06-04 15:33:08 +0000 |
| commit | 762cbe7018048a2aca7673b2420a722bfa000c84 (patch) | |
| tree | c444c40a280c51fac716b2226d1f2af6ca17ad55 | |
| parent | 09e5b1ca76e0e47d8df49d8062e0e52bfea12344 (diff) | |
| download | bcm5719-llvm-762cbe7018048a2aca7673b2420a722bfa000c84.tar.gz bcm5719-llvm-762cbe7018048a2aca7673b2420a722bfa000c84.zip | |
[CMake] Add warning for using compile and link pools on unsupported versions of CMake or non-ninja generators.
Summary: I've gotten feedback from users on CMake 2.8 that the compile and link pool options were not working. This is expected so I'm adding a warning so we can report invalid configurations to users.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10193
llvm-svn: 239044
| -rw-r--r-- | llvm/CMakeLists.txt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 568376ee700..837148bb8d7 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -32,15 +32,23 @@ project(LLVM) set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING "Define the maximum number of concurrent compilation jobs.") if(LLVM_PARALLEL_COMPILE_JOBS) - set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${LLVM_PARALLEL_COMPILE_JOBS}) - set(CMAKE_JOB_POOL_COMPILE compile_job_pool) + if(CMAKE_VERSION VERSION_LESS 3.0 OR NOT CMAKE_MAKE_PROGRAM STREQUAL "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}) + set(CMAKE_JOB_POOL_COMPILE compile_job_pool) + endif() endif() set(LLVM_PARALLEL_LINK_JOBS "" CACHE STRING "Define the maximum number of concurrent link jobs.") if(LLVM_PARALLEL_LINK_JOBS) - set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${LLVM_PARALLEL_LINK_JOBS}) - set(CMAKE_JOB_POOL_LINK link_job_pool) + if(CMAKE_VERSION VERSION_LESS 3.0 OR NOT CMAKE_MAKE_PROGRAM STREQUAL "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}) + set(CMAKE_JOB_POOL_LINK link_job_pool) + endif() endif() # Add path for custom modules |

