Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*

A problem of using cmake and dpcpp

Xuwen_T_Intel
Employee
1,044 Views

Hi,

I found the dpcpp compiler was always overridden by the MSVC, when I used CMAKE (ver. 3.21.2) or CMAKE_GUI to make a project. Please take a look at the attached file. Is there a way that can handle this problem?

From some essays, it was said that the project() statement in the CMake uses MSBuild, which automatically compute the values of  CMAKE_{C,CXX}_COMPILER. After tried the methods that I can think, I found the problem was still there.  Thanks for feedback and helps here. 

0 Kudos
3 Replies
SantoshY_Intel
Moderator
1,011 Views

Hi,


Thanks for reaching out to us.


We are working on your issue internally and we will get back to you soon.


Best Regards,

Santosh


0 Kudos
Alex_Y_Intel
Moderator
966 Views

In order to use CMake with DPC++ on Windows platform, two supported generators are Microsoft Visual Studio* and Make/Ninja.

Please reference this guide:

https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-setup/using-the-command-line/using-cmake-with-data-parallel-c-dpc.html



0 Kudos
Alex_Y_Intel
Moderator
867 Views

I am going to close this case for now as a solution has been provided.


0 Kudos
Reply