Integration in Clion

I am new to Sycl and have previously implemented a project with OpenCL. After a few hours I managed to compile the examples and get them running.

Can someone provide an example cmakelist.txt so I can see how to integrate sycl into the clion build process?

There has been a discussion about CMake integration with SYCL on the CMake project but as yet it has not quite been able to progress but you might want to add your support to such an effort. https ://
In the meantime there are some useful files here https ://

If you are using DPC++, you may want to use

SET(CMAKE_CXX_FLAGS "-fsycl -fsycl-unnamed-lambda")

And this should be what you need.

However if you want to use DPC++ with the CUDA support you will need to use

SET(CMAKE_CXX_FLAGS "-fsycl -fsycl-targets=nvptx64-nvidia-cuda-sycldevice  -fsycl-unnamed-lambda -Wno-unknown-cuda-version")

Alternatively you could use the script

source /opt/intel/oneapi/ 

and then launch CLion from that same shell so all the required environment variables are passed to CLion and it’s subprocesses, you just have to select the DPC++ compiler in your toolchain.