Skip to content

Commit 4918376

Browse files
sarnexkbenzie
authored andcommitted
Fix build with XPTI disabled (#18269)
There were two issues: 1) Setting `UR_ENABLE_TRACING` on the command line didn't work because the SYCL code calling the FetchUR CMake files didn't use `CACHE`, also fixed two other vars with the same problem. 2) XPTI SYCL tests were built even if XPTI wasn't built, causing a build failure. Also add two errors so the problem isn't discovered in a build failure. --------- Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
1 parent 1e8fe96 commit 4918376

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ else()
159159
set(UR_DPCXX_DEPS "")
160160
endif()
161161

162+
if(NOT UR_STANDALONE_BUILD AND
163+
UR_ENABLE_TRACING AND
164+
DEFINED LLVM_EXTERNAL_PROJECTS AND
165+
(NOT "xpti" IN_LIST LLVM_EXTERNAL_PROJECTS OR NOT "xptifw" IN_LIST LLVM_EXTERNAL_PROJECTS))
166+
message(FATAL_ERROR "UR_ENABLE_TRACING=ON but XPTI is not going to be built")
167+
endif()
168+
162169
if(UR_ENABLE_TRACING)
163170
add_compile_definitions(UR_ENABLE_TRACING)
164171

0 commit comments

Comments
 (0)