[Openmp-commits] [openmp] [OpenMP][NFC] Fix warning for OpenMP standalone build (PR #93463)
via Openmp-commits
openmp-commits at lists.llvm.org
Mon May 27 05:17:44 PDT 2024
https://github.com/jprotze created https://github.com/llvm/llvm-project/pull/93463
PR #75125 introduced upward propagation of some OMPT-related CMake variables.
For stand-alone builds this results in a warning that `SCOPE_PARENT` has no meaning in a top-level directory.
>From 86dc6673999ed5d332233343726ae70aad588230 Mon Sep 17 00:00:00 2001
From: Joachim Jenke <jenke at itc.rwth-aachen.de>
Date: Mon, 27 May 2024 14:14:20 +0200
Subject: [PATCH] [OpenMP][NFC] Fix warning for OpenMP standalone build
PR #75125 introduced upward propagation of some OMPT-related CMake variables.
For stand-alone builds this results in a warning that SCOPE_PARENT has no
meaning in a top-level directory.
---
openmp/CMakeLists.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
index c228a392e4c7a..e565354ccc7f2 100644
--- a/openmp/CMakeLists.txt
+++ b/openmp/CMakeLists.txt
@@ -137,8 +137,10 @@ if (OPENMP_ENABLE_OMPT_TOOLS)
endif()
# Propagate OMPT support to offload
-set(LIBOMP_HAVE_OMPT_SUPPORT ${LIBOMP_HAVE_OMPT_SUPPORT} PARENT_SCOPE)
-set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${LIBOMP_OMP_TOOLS_INCLUDE_DIR} PARENT_SCOPE)
+if(NOT ${OPENMP_STANDALONE_BUILD})
+ set(LIBOMP_HAVE_OMPT_SUPPORT ${LIBOMP_HAVE_OMPT_SUPPORT} PARENT_SCOPE)
+ set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${LIBOMP_OMP_TOOLS_INCLUDE_DIR} PARENT_SCOPE)
+endif()
option(OPENMP_MSVC_NAME_SCHEME "Build dll with MSVC naming scheme." OFF)
More information about the Openmp-commits
mailing list