Skip to content

Commit b1d39f2

Browse files
Choose version of IntelSycl compiler based on whether dpcpp occurs in CMAKE_CXX_COMPILER
1 parent 61e10a4 commit b1d39f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dpctl-capi/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ option(DPCTL_BUILD_CAPI_TESTS
3636
)
3737

3838
# Minimum version requirement only when oneAPI dpcpp is used.
39-
if(DPCTL_CUSTOM_DPCPP_INSTALL_DIR)
40-
find_package(IntelSycl REQUIRED)
41-
else()
39+
if("{CMAKE_CXX_COMPILER}" MATCHES "dpcpp")
4240
find_package(IntelSycl 2021.2.0 REQUIRED)
41+
else()
42+
find_package(IntelSycl REQUIRED)
4343
endif()
4444

4545
if(DPCTL_ENABLE_LO_PROGRAM_CREATION)

0 commit comments

Comments
 (0)