[Openmp-commits] [openmp] [OpenMP][omptest] Fix CMake target properties (PR #176802)

Michael Halkenhäuser via Openmp-commits openmp-commits at lists.llvm.org
Mon Jan 19 10:56:57 PST 2026


https://github.com/mhalk created https://github.com/llvm/llvm-project/pull/176802

Fix visibility of target properties:
 * INCLUDE_DIRECTORIES
 * COMPILE_DEFINITIONS

implicitly pulled in from `default_gtest`.

Fixes: https://github.com/llvm/llvm-project/pull/159416

>From 621d6a1d3220ff861134787c904fc40b5f3ee85b Mon Sep 17 00:00:00 2001
From: Michael Halkenhaeuser <MichaelGerald.Halkenhauser at amd.com>
Date: Mon, 19 Jan 2026 12:48:30 -0600
Subject: [PATCH] [OpenMP][omptest] Fix CMake target properties

Fix visibility of target properties:
 * INCLUDE_DIRECTORIES
 * COMPILE_DEFINITIONS

implicitly pulled in from default_gtest.

Fixes: https://github.com/llvm/llvm-project/pull/159416
---
 openmp/tools/omptest/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openmp/tools/omptest/CMakeLists.txt b/openmp/tools/omptest/CMakeLists.txt
index 63bbd3d7adb84..98ca822367284 100644
--- a/openmp/tools/omptest/CMakeLists.txt
+++ b/openmp/tools/omptest/CMakeLists.txt
@@ -85,7 +85,7 @@ if ((NOT LIBOMPTEST_BUILD_STANDALONE) OR LIBOMPTEST_BUILD_UNITTESTS)
   # Link against the default GTest which at this point primarily pulls in the
   # include directories and compile definitions. It is important to make these
   # available to dependant targets, e.g. for unit tests.
-  target_link_libraries(omptest INTERFACE default_gtest)
+  target_link_libraries(omptest PUBLIC default_gtest)
 
   # Link against Threads (recommended for GTest).
   find_package(Threads REQUIRED)



More information about the Openmp-commits mailing list