Skip to content

Commit 220b40b

Browse files
author
Kanaev
committed
[SYCL] Make cmake file for unit-tests more robust
Signed-off-by: Kanaev <[email protected]>
1 parent 0debfb1 commit 220b40b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sycl/cmake/modules/AddSYCLUnitTest.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ macro(add_sycl_unittest test_dirname link_variant)
66
# Enable exception handling for these unit tests
77
set(LLVM_REQUIRES_EH 1)
88

9-
if (MSVC AND CMAKE_BUILD_TYPE MATCHES "Debug")
9+
string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_lower)
10+
if (MSVC AND build_type_lower MATCHES "debug")
1011
set(sycl_obj_target "sycld_object")
1112
set(sycl_so_target "sycld")
1213
else()
@@ -50,7 +51,8 @@ endmacro()
5051
macro(add_sycl_unittest_with_device test_dirname link_variant)
5152
set(LLVM_REQUIRES_EH 1)
5253

53-
if (MSVC AND CMAKE_BUILD_TYPE MATCHES "Debug")
54+
string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_lower)
55+
if (MSVC AND build_type_lower MATCHES "debug")
5456
set(sycl_obj_target "sycld_object")
5557
set(sycl_so_target "sycld")
5658
set(XPTI_LIB xptid)

0 commit comments

Comments
 (0)