Skip to content

Commit 5369bc8

Browse files
authored
Normalize some boolean option values to 0/1. (#535)
1 parent 1a461b4 commit 5369bc8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ include(HandleLLVMOptions)
8282
set(IMEX_ENABLE_SYCL_RUNTIME 0 CACHE BOOL "Enable the Sycl Runtime")
8383
set(IMEX_ENABLE_L0_RUNTIME 0 CACHE BOOL "Enable the Level Zero Runtime")
8484

85+
# Normalize IMEX_ENABLE_SYCL_RUNTIME and IMEX_ENABLE_L0_RUNTIME
86+
# These values are expected to be passed as 0 or 1 to imex-runner.py
87+
if (IMEX_ENABLE_SYCL_RUNTIME)
88+
set(IMEX_ENABLE_SYCL_RUNTIME 1)
89+
else ()
90+
set(IMEX_ENABLE_SYCL_RUNTIME 0)
91+
endif()
92+
93+
if (IMEX_ENABLE_L0_RUNTIME)
94+
set(IMEX_ENABLE_L0_RUNTIME 1)
95+
else ()
96+
set(IMEX_ENABLE_L0_RUNTIME 0)
97+
endif()
8598

8699
# Check if mlir vulkan runner was configured from mlir
87100
# target mlir-vulkan-runner is only set if vulkan runner was enabled during

0 commit comments

Comments
 (0)