Skip to content

Commit 6343c9b

Browse files
authored
[offload] Permit redefining OPENMP_STANDALONE_BUILD (#157253)
Permit redefining `OPENMP_STANDALONE_BUILD` to make it possible to build offload correctly via runtimes build (i.e. build where the top-level project is `runtimes`). This follows the same logic in `openmp` component. Signed-off-by: Michał Górny <[email protected]>
1 parent e38392b commit 6343c9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

offload/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
cmake_minimum_required(VERSION 3.20.0)
55
set(LLVM_SUBPROJECT_TITLE "liboffload")
66

7-
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
7+
# Permit redefining OPENMP_STANDALONE_BUILD when doing a runtimes build.
8+
if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
89
set(OPENMP_STANDALONE_BUILD TRUE)
910
project(offload C CXX ASM)
1011
else()

0 commit comments

Comments
 (0)