Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

Embree sycl cmake

peizhao
Beginner
944 Views

Hi,

 

I try to build a cycle-based Embree application with Cmake as attached below:

 

cmake_minimum_required(VERSION 3.22.1)

set(CMAKE_CXX_COMPILER icpx)
set(CMAKE_C_COMPILER icx)
set(EMBREE_SYCL_SUPPORT ON)

project(HELLOEMBREE)
 
set(embree_DIR /mnt/d/embree-4.1.0.x86_64.linux/lib/cmake/embree-4.1.0/)
set(TBB_DIR /mnt/d/oneapi-tbb-2021.2.0/lib/cmake/tbb/)
 
FIND_PACKAGE(IntelSYCL REQUIRED)
FIND_PACKAGE(embree 4 REQUIRED)
 
add_executable(HELLOEMBREE embreeTest.cpp)
TARGET_LINK_LIBRARIES(HELLOEMBREE embree)
 
add_sycl_to_target(
    TARGET HELLOEMBREE
    SOURCES embreeTest.cpp
  )

 

While the code I was running was one of the examples codes online

embreeTest.cpp 

 

After Cmake generates the make file in the build directory, I try to build the code using make command the following error occurs:

 

/mnt/d/Embree_helloWorld/embreeTest.cpp:108:22: error: use of undeclared identifier 'rtcNewSYCLDevice'
RTCDevice device = rtcNewSYCLDevice(sycl_context, "");
^
/mnt/d/Embree_helloWorld/embreeTest.cpp:109:3: error: use of undeclared identifier 'rtcSetDeviceSYCLDevice'
rtcSetDeviceSYCLDevice(device,sycl_device);
^
/mnt/d/Embree_helloWorld/embreeTest.cpp:303:32: error: use of undeclared identifier 'rtcSYCLDeviceSelector'
sycl_device = sycl::device(rtcSYCLDeviceSelector);
^
/mnt/d/Embree_helloWorld/embreeTest.cpp:306:5: error: use of undeclared identifier 'embree'
embree::printAllSYCLDevices();
^
4 errors generated.
gmake[2]: *** [CMakeFiles/HELLOEMBREE.dir/build.make:76: CMakeFiles/HELLOEMBREE.dir/embreeTest.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/HELLOEMBREE.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

 

here is platform information:

System: window11 wsl2

cmake version: 3.22.1

dpcpp version: Intel(R) oneAPI DPC++/C++ Compiler 2023.1.0 (2023.1.0.20230320)

 

Thanks in advance cheers

 

 

 

 

 

Labels (1)
0 Kudos
2 Replies
VaishnaviV_Intel
Moderator
880 Views

Hi,


Thanks for posting on Intel communities.

We would suggest you to post your Intel Embree related query in  Intel® Embree Ray Tracing Kernels forum. So, Kindly raise a new thread.


Thanks & Regards,

Vankudothu Vaishnavi.


0 Kudos
VaishnaviV_Intel
Moderator
839 Views

Hi,

 

Hope you have posted your query in Intel® Embree Ray Tracing Kernels forum. We are going ahead and closing this thread. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.

 

Thanks & Regards,

Vankudothu Vaishnavi

0 Kudos
Reply