[polly] [Polly] Fix gtest logic for standalone builds (PR #121114)
Michał Górny via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 25 08:53:05 PST 2024
https://github.com/mgorny created https://github.com/llvm/llvm-project/pull/121114
Fix the gtest logic to account for llvm_gtest being installed as part of LLVM, as of 91b3ca39667b6341a8c1983a1467fae14b58318b.
>From 3574a0a9e0e6d0e53c4d8ce65e11794b0cc69a2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny at gentoo.org>
Date: Wed, 25 Dec 2024 17:48:00 +0100
Subject: [PATCH] [Polly] Fix gtest logic for standalone builds
Fix the gtest logic to account for llvm_gtest being installed as part
of LLVM, as of 91b3ca39667b6341a8c1983a1467fae14b58318b.
---
polly/CMakeLists.txt | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt
index b4cfc77d0f213c..955c171b3967fe 100644
--- a/polly/CMakeLists.txt
+++ b/polly/CMakeLists.txt
@@ -29,11 +29,7 @@ if(POLLY_STANDALONE_BUILD)
# Enable unit tests if available.
set(POLLY_GTEST_AVAIL 0)
- set(UNITTEST_DIR ${LLVM_THIRD_PARTY_DIR}/unittest)
- if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h)
- if (NOT TARGET gtest)
- add_subdirectory(${UNITTEST_DIR} third-party/unittest)
- endif()
+ if(TARGET llvm_gtest)
set(POLLY_GTEST_AVAIL 1)
endif()
More information about the llvm-commits
mailing list