Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7833 Discussions

Cannot CMake simple C++ code (Windows)

fonis
Novice
964 Views

I have installed Intel oneAPI Base toolkit. 

I cannot cmake simple C++ code (refer to the attachement hw.7z.). 

I used the following link use-cmake-with-the-intel-oneapi-dpc-c-compiler 

 

cmake version is 3.24.1

 

I tried the following command from "Intel oneAPI command prompt for Intel 64 for Visual Studio 2019"

"d:\hw\build>cmake -T"Intel(R) oneAPI DPC++ Compiler 2022" -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx -GNinja .. "

 

I tried some variations of it: (a) leave out -GNinja so that the visual studio project and sln files are generated (b) without -T option

 

I have attached CMake log and IntelDPCPPConfig.cmake (on my system)

 

 

 

0 Kudos
6 Replies
SeshaP_Intel
Moderator
925 Views

Hi,

 

Thank you for posting in Intel Communities.

We have tried your code and were unable to reproduce your issue as we got some other issues.

Please find the below screenshot for the error we are facing.

Could you please help us in reproducing your issue by providing detailed steps that you have followed?

 

155f2a61-a2e0-48ee-b86a-a1c00af528d8.png

 

Thanks and Regards,

Pendyala Sesha Srinivas 

 

0 Kudos
fonis
Novice
896 Views

Sorry but I attached wrong cmake.log file. I am also acing the exact same error that you saw as attached below. 

cmake-error.png

0 Kudos
fonis
Novice
859 Views

Please let me know if you need more information

0 Kudos
SeshaP_Intel
Moderator
833 Views

Hi,

 

We have tried a sample program from our end. We didn't face any issues with CMake.

Please find the attachment below for the source code that we have tried.

Also please refer to the below screenshot for more details.

screenshot.PNG

We hope this replicates your scenario. If you still face any issues please let us know with the complete error log.

 

Thanks and Regards,

Pendyala Sesha Srinivas

 

 

0 Kudos
fonis
Novice
804 Views

Thanks. This works.

I followed instructions at use-cmake-with-the-intel-oneapi-dpc-c-compiler 

Do you think it should be revised or I am missing sth?

0 Kudos
SeshaP_Intel
Moderator
737 Views

Hi,


Glad to know that your issue is resolved. We have provided your feedback to the relevant team.

If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks and Regards,

Pendyala Sesha Srinivas


0 Kudos
Reply