From 9f37775472b45986b0ecce5243bd6ce119e5bd69 Mon Sep 17 00:00:00 2001 From: Stella Laurenzo Date: Wed, 2 Mar 2022 10:17:05 -0800 Subject: [cmake] Prefix gtest and gtest_main with "llvm_". The upstream project ships CMake rules for building vanilla gtest/gmock which conflict with the names chosen by LLVM. Since LLVM's build rules here are quite specific to LLVM, prefixing them to avoid collision is the right thing (i.e. there does not appear to be a path to letting someone *replace* LLVM's googletest with one they bring, so co-existence should be the goal). This allows LLVM to be included with testing enabled within projects that themselves have a dependency on an official gtest release. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D120789 --- libc/benchmarks/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/benchmarks') diff --git a/libc/benchmarks/CMakeLists.txt b/libc/benchmarks/CMakeLists.txt index 54f70c4..0e9ec5a 100644 --- a/libc/benchmarks/CMakeLists.txt +++ b/libc/benchmarks/CMakeLists.txt @@ -25,8 +25,8 @@ function(add_libc_benchmark_unittest target_name) ) target_link_libraries(${target_name} PRIVATE - gtest_main - gtest + llvm_gtest_main + llvm_gtest ${LIBC_BENCHMARKS_UNITTEST_DEPENDS} ) llvm_update_compile_flags(${target_name}) -- cgit v1.1