Need a module to check for SYCL support and add in SYCL features
Proposing to add a Find Module for SYCL. An implementation is proposed to be added through this Pull request.
https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5701
The need:
(1) SYCL is not a language but a library that is built on CXX.
(a) Treating SYCL as language requires lot of redundant changes in Module/Platforms and Module/Compilers.
(b) Rather, we want to have all the CXX support added through Determine*CXX*.cmake and Platforms/<Vendor>*CXX*.cmake and ONLY add incremental SYCL features when user explicitly loads the SYCL module.
(2) oneAPI needs seemless compile/run environment with or without SYCL.
For Intel's SYCL compilers, use icx/icpx and pass flags that supports SYCL/DPCPP when user intends to compile the code using SYCL compiler.
For non-Intel SYCL compilers, verify if the CMAKE_CXX_COMPILER actually supports SYCL or not. And if the compiler is of clang family, pass in -fsycl to clang to enable Sycl compiler.
issue