From 86dc6673999ed5d332233343726ae70aad588230 Mon Sep 17 00:00:00 2001 From: Joachim Jenke 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)