[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 09:30:56 PDT 2019


hintonda added a comment.

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

> .. this doesn't look like what i proposed, and has some unrelated diff?


It uses your wrapper suggestion, but keeps everything local to benchmark.  Generally, if projects are build within other projects, e.g., see `clang/CMakeLists.txt`, they don't redeclare `project()`.  Doing so wipes out some state, most notably policies.  By checking, you preserve whatever the parent project set.

The only other change is just to fix the path to be relative to the cmake file instead of the project root, which will be different when contained in another project.


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