Commit c2dcdf95 authored by Guillaume Chatelet's avatar Guillaume Chatelet
Browse files

[libc] Fix benchmarks CMakeLists.txt

Summary:
This is a follow up on https://reviews.llvm.org/rGaba80d0734d1#886881.
`target_link_options` requires CMake>=3.13.

Reviewers: abrachet

Subscribers: mgorny, MaskRay, tschuett, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D73452
parent ea1e3369
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -91,9 +91,17 @@ add_library(libc-benchmark
    LibcBenchmark.h
)
add_dependencies(libc-benchmark google-benchmark)
target_include_directories(libc-benchmark PUBLIC "${GOOGLE_BENCHMARK_LIBC_INSTALL}/include")
target_link_options(libc-benchmark PUBLIC "${GOOGLE_BENCHMARK_LINK_FLAGS}")
target_link_libraries(libc-benchmark PUBLIC LLVMSupport -lbenchmark Threads::Threads)
target_include_directories(libc-benchmark
    PUBLIC
    "${GOOGLE_BENCHMARK_LIBC_INSTALL}/include"
)
target_link_libraries(libc-benchmark
    PUBLIC
    "${GOOGLE_BENCHMARK_LINK_FLAGS}" # FIXME: Move to `target_link_options`
    -lbenchmark                      # FIXME: Move to `target_link_options`
    LLVMSupport
    Threads::Threads
)
fix_rtti(libc-benchmark)

add_libc_benchmark_unittest(libc-benchmark-test