Skip to content

Commit 80021ff

Browse files
Diptorup Deboleksandr-pavlyk
Diptorup Deb
authored andcommitted
Use LESS_EQUAL instead of EQUAL for DPCPP version checking.
1 parent 81fc1d0 commit 80021ff

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

dpctl-capi/cmake/modules/FindIntelSycl.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ endif()
125125

126126
# Check if a specific version of DPCPP is requested.
127127
if(IntelSycl_FIND_VERSION AND (DEFINED IntelSycl_VERSION))
128-
string(COMPARE EQUAL ${IntelSycl_FIND_VERSION} ${IntelSycl_VERSION} VERSION_MATCH)
128+
string(COMPARE LESS_EQUAL ${IntelSycl_FIND_VERSION} ${IntelSycl_VERSION} VERSION_MATCH)
129129
if(VERSION_MATCH)
130130
set(IntelSycl_FOUND TRUE)
131131
endif()

dpctl-capi/tests/CMakeLists.txt

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,12 @@ if(DPCTL_GENERATE_COVERAGE)
4949
${dpctl_sources}
5050
${helper_sources}
5151
)
52-
if(DEFINED ${DPCTL_ENABLE_LO_PROGRAM_CREATION})
53-
target_link_libraries(dpctl_c_api_tests
54-
${CMAKE_THREAD_LIBS_INIT}
55-
GTest::GTest
56-
${LEVEL_ZERO_LIBRARY}
57-
${IntelSycl_OPENCL_LIBRARY}
58-
${CMAKE_DL_LIBS}
59-
)
60-
else()
61-
target_link_libraries(dpctl_c_api_tests
62-
${CMAKE_THREAD_LIBS_INIT}
63-
GTest::GTest
64-
${IntelSycl_OPENCL_LIBRARY}
65-
${CMAKE_DL_LIBS}
66-
)
67-
endif()
68-
52+
target_link_libraries(dpctl_c_api_tests
53+
${CMAKE_THREAD_LIBS_INIT}
54+
GTest::GTest
55+
${IntelSycl_OPENCL_LIBRARY}
56+
${CMAKE_DL_LIBS}
57+
)
6958
add_custom_target(llvm-cov
7059
COMMAND ${CMAKE_MAKE_PROGRAM} dpctl_c_api_tests
7160
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/dpctl_c_api_tests

0 commit comments

Comments
 (0)