[Openmp-commits] [openmp] ff77f67 - [OpenMP][NFC] Fix warning for OpenMP standalone build (#93463)

via Openmp-commits openmp-commits at lists.llvm.org
Thu Jun 6 07:13:55 PDT 2024


Author: Joachim
Date: 2024-06-06T16:13:50+02:00
New Revision: ff77f67c47b7f06334110b5d7d4b9350288832ba

URL: https://github.com/llvm/llvm-project/commit/ff77f67c47b7f06334110b5d7d4b9350288832ba
DIFF: https://github.com/llvm/llvm-project/commit/ff77f67c47b7f06334110b5d7d4b9350288832ba.diff

LOG: [OpenMP][NFC] Fix warning for OpenMP standalone build (#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.

Added: 
    

Modified: 
    openmp/CMakeLists.txt

Removed: 
    


################################################################################
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