Skip to content

Commit 4e486b4

Browse files
committed
Fix cmake issue
Signed-off-by: jinge90 <[email protected]>
1 parent 3bdc448 commit 4e486b4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,12 @@ function(add_devicelibs filename)
197197
endforeach()
198198

199199
foreach(arch IN LISTS devicelib_arch)
200-
list(FIND ${ARG_SKIP_ARCHS} "${arch}" skip_idx)
201-
if (${skip_idx} EQUAL -1)
200+
set(skip_idx -1)
201+
set(skip_arch_list ${ARG_SKIP_ARCHS})
202+
if (skip_arch_list)
203+
list(FIND skip_arch_list ${arch} skip_idx)
204+
endif()
205+
if (skip_idx EQUAL -1)
202206
compile_lib(${filename}-${arch}
203207
FILETYPE bc
204208
SRC ${ARG_SRC}

0 commit comments

Comments
 (0)