Skip to content

Commit ff77f67

Browse files
authored
[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.
1 parent d9e6a56 commit ff77f67

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

openmp/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ if (OPENMP_ENABLE_OMPT_TOOLS)
137137
endif()
138138

139139
# Propagate OMPT support to offload
140-
set(LIBOMP_HAVE_OMPT_SUPPORT ${LIBOMP_HAVE_OMPT_SUPPORT} PARENT_SCOPE)
141-
set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${LIBOMP_OMP_TOOLS_INCLUDE_DIR} PARENT_SCOPE)
140+
if(NOT ${OPENMP_STANDALONE_BUILD})
141+
set(LIBOMP_HAVE_OMPT_SUPPORT ${LIBOMP_HAVE_OMPT_SUPPORT} PARENT_SCOPE)
142+
set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${LIBOMP_OMP_TOOLS_INCLUDE_DIR} PARENT_SCOPE)
143+
endif()
142144

143145
option(OPENMP_MSVC_NAME_SCHEME "Build dll with MSVC naming scheme." OFF)
144146

0 commit comments

Comments
 (0)