[all-commits] [llvm/llvm-project] 9f3777: [cmake] Prefix gtest and gtest_main with "llvm_".

Stella Laurenzo via All-commits all-commits at lists.llvm.org
Wed Mar 2 10:53:59 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f37775472b45986b0ecce5243bd6ce119e5bd69
      https://github.com/llvm/llvm-project/commit/9f37775472b45986b0ecce5243bd6ce119e5bd69
  Author: Stella Laurenzo <stellaraccident at gmail.com>
  Date:   2022-03-02 (Wed, 02 Mar 2022)

  Changed paths:
    M compiler-rt/lib/asan/tests/CMakeLists.txt
    M compiler-rt/lib/fuzzer/tests/CMakeLists.txt
    M compiler-rt/lib/gwp_asan/tests/CMakeLists.txt
    M compiler-rt/lib/interception/tests/CMakeLists.txt
    M compiler-rt/lib/msan/tests/CMakeLists.txt
    M compiler-rt/lib/orc/unittests/CMakeLists.txt
    M compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
    M compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
    M compiler-rt/lib/tsan/tests/CMakeLists.txt
    M compiler-rt/lib/xray/tests/CMakeLists.txt
    M flang/CMakeLists.txt
    M libc/benchmarks/CMakeLists.txt
    M libc/test/utils/tools/CMakeLists.txt
    M lldb/unittests/CMakeLists.txt
    M llvm/cmake/modules/AddLLVM.cmake
    M llvm/lib/Testing/Support/CMakeLists.txt
    M llvm/runtimes/CMakeLists.txt
    M llvm/unittests/Support/CommandLineInit/CMakeLists.txt
    M llvm/utils/unittest/CMakeLists.txt
    M llvm/utils/unittest/UnitTestMain/CMakeLists.txt

  Log Message:
  -----------
  [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




More information about the All-commits mailing list