[libc-commits] [PATCH] D122392: [NFC][libc] Find the benchmark package and adjust the dependency targets

Guoxiong Li via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Mar 24 06:05:21 PDT 2022


lgxbslgx created this revision.
Herald added subscribers: ecnelises, tschuett, pengfei, mgorny.
Herald added projects: libc-project, All.
lgxbslgx requested review of this revision.

This commit <https://reviews.llvm.org/rG02022ccccc878421384d4473cd46ef0324e753a8> removed unneeded gtest and benchmark configuration.

But it could not find the right benchmark package and provided the non-existent dependency targets.

This patch fixes it and the test `check-llvmlibc` passed locally(x86-linux).

Thanks for taking the time to review.

Best Regards,

- Guoxiong


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122392

Files:
  libc/benchmarks/CMakeLists.txt


Index: libc/benchmarks/CMakeLists.txt
===================================================================
--- libc/benchmarks/CMakeLists.txt
+++ libc/benchmarks/CMakeLists.txt
@@ -52,7 +52,8 @@
     LibcBenchmark.cpp
     LibcBenchmark.h
 )
-add_dependencies(libc-benchmark benchmark)
+find_package(benchmark REQUIRED PATHS "${LLVM_THIRD_PARTY_DIR}/benchmark")
+add_dependencies(libc-benchmark benchmark::benchmark benchmark::benchmark_main)
 target_link_libraries(libc-benchmark
     PUBLIC
     benchmark


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122392.417899.patch
Type: text/x-patch
Size: 507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220324/09bd096a/attachment.bin>


More information about the libc-commits mailing list