[llvm] r239044 - [CMake] Add warning for using compile and link pools on unsupported versions of CMake or non-ninja generators.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Thu Jun 4 11:53:06 PDT 2015


No, this does not work at all.
CMAKE_MAKE_PROGRAM includes the full path to ninja binary, so it would
never pass this check.
I'll change this to check for CMAKE_GENERATOR instead.

On Thu, Jun 4, 2015 at 8:33 AM, Chris Bieneman <beanz at apple.com> wrote:
> Author: cbieneman
> Date: Thu Jun  4 10:33:08 2015
> New Revision: 239044
>
> URL: http://llvm.org/viewvc/llvm-project?rev=239044&view=rev
> Log:
> [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
>
> Modified:
>     llvm/trunk/CMakeLists.txt
>
> Modified: llvm/trunk/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=239044&r1=239043&r2=239044&view=diff
> ==============================================================================
> --- llvm/trunk/CMakeLists.txt (original)
> +++ llvm/trunk/CMakeLists.txt Thu Jun  4 10:33:08 2015
> @@ -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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list