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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 23:19:23 PDT 2019


lebedev.ri added a comment.

Let's make this a bit more upstreamable:
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