[PATCH] D61660: [cmake] Make google benchmark project call llvm_add_library

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 01:17:27 PDT 2019


hintonda added a comment.

In D61660#1494517 <https://reviews.llvm.org/D61660#1494517>, @lebedev.ri wrote:

> Let's make this a bit more upstreamable:


Thanks for taking a look.  I like the changes you suggest and will implement them in my next diff, then submit a PR, plus documentation, once it lands.

thanks again...

> Add this to `llvm/CMakeLists.txt`
> 
>     function(benchmark_add_library target)
>       llvm_add_library(${target} ${ARGN})
>     endfunction()
>   
>     add_subdirectory(utils/benchmark)
>     add_subdirectory(benchmarks)
>   endif()
> 
> 
> Change `add_library`/`llvm_add_library` to `benchmark_add_library` in `llvm/utils/benchmark/src/CMakeLists.txt`
> 
> Add
> 
>   # Creates a new library build target. Use this instead of `add_library`.
>   if(NOT COMMAND benchmark_add_library)
>     function(benchmark_add_library target)
>       add_library(${target} ${ARGN})
>     endfunction()
>   endif() # NOT COMMAND benchmark_add_library
> 
> 
> maybe to `llvm/utils/benchmark/CMakeLists.txt` ?
> 
> Submit a PR upstream.
>  Add README.llvm entry




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61660/new/

https://reviews.llvm.org/D61660





More information about the llvm-commits mailing list