Skip to content

Commit 89c92b0

Browse files
authored
[OpenMP][Offload] - Ensure OPENMP_STANDALONE_BUILD is defined (#94801)
Without a value set conditional checks like if(NOT ${OPENMP_STANDALONE_BUILD}) will not be able to evaluate to true. Fixes issue introduced from PR #93463, which did not allow the OMPT variable to be propogated up to offload during a runtimes build.
1 parent 166c184 commit 89c92b0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

offload/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set(LLVM_SUBPROJECT_TITLE "liboffload")
77
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
88
set(OPENMP_STANDALONE_BUILD TRUE)
99
project(offload C CXX ASM)
10+
else()
11+
set(OPENMP_STANDALONE_BUILD FALSE)
1012
endif()
1113

1214
# Check that the library can actually be built.

openmp/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ list(INSERT CMAKE_MODULE_PATH 0
1313
if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
1414
set(OPENMP_STANDALONE_BUILD TRUE)
1515
project(openmp C CXX ASM)
16+
else()
17+
set(OPENMP_STANDALONE_BUILD FALSE)
1618
endif()
1719

1820
# Must go below project(..)

0 commit comments

Comments
 (0)