mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
xpu: fix 3rd party builds on systems with cmake<3.25 (#135767)
Cmake LINUX variable is available on starting from cmake 3.25. Better to use CMAKE_SYSTEM_NAME instead to relax cmake version requirement. See: https://cmake.org/cmake/help/v3.25/variable/LINUX.html Fixes: #135766 Pull Request resolved: https://github.com/pytorch/pytorch/pull/135767 Approved by: https://github.com/malfet, https://github.com/guangyey
This commit is contained in:
parent
6354271178
commit
9852c6d236
|
|
@ -49,7 +49,10 @@ find_file(
|
|||
)
|
||||
|
||||
# Find SYCL library fullname.
|
||||
if(LINUX)
|
||||
# Don't use if(LINUX) here since this requires cmake>=3.25 and file is installed
|
||||
# and used by other projects.
|
||||
# See: https://cmake.org/cmake/help/v3.25/variable/LINUX.html
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
find_library(
|
||||
SYCL_LIBRARY
|
||||
NAMES sycl-preview
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user