<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Intel Compiler 2022 as a toolset in cmake not working in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1412774#M2481</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for posting in Intel Communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please use the below cmake command and let us know if it helps?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mkdir build &amp;amp;&amp;amp; cd build
cmake -DCMAKE_CXX_COMPILER=dpcpp -GNinja ..&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We tried at our end and we were able to build the application successfully as shown in the screenshot attached.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SantoshY_Intel_0-1662375584758.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/33129i5044028AEF48884C/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="SantoshY_Intel_0-1662375584758.png" alt="SantoshY_Intel_0-1662375584758.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2022 11:00:21 GMT</pubDate>
    <dc:creator>SantoshY_Intel</dc:creator>
    <dc:date>2022-09-05T11:00:21Z</dc:date>
    <item>
      <title>Using Intel Compiler 2022 as a toolset in cmake not working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1412495#M2477</link>
      <description>&lt;P&gt;Tried to build oneDNN with Intel Compiler 2022.1.0.138 using these documentation&lt;/P&gt;
&lt;P&gt;&lt;A href="https://oneapi-src.github.io/oneDNN/dev_guide_build.html#windows" target="_self"&gt;oneDNN build documentation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/developer/articles/technical/using-oneapi-compilers-with-cmake-in-visual-studio.html" target="_self"&gt;Configuring CMake* and Microsoft Visual Studio* 2019 for Use with Intel Compilers&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An error occurred when running cmake&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;cmake -G "Visual Studio 17 2022" -A x64 -T "Intel(R) oneAPI DPC++ Compiler" ..&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-- CMAKE_BUILD_TYPE is unset, defaulting to Release&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.25099.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CMake Error at CMakeLists.txt:81 (project):&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Failed to run MSBuild command:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;to get the value of VCTargetsPath:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;MSBuild version 17.3.1+2badb37d1 for .NET Framework&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Build started 9/2/2022 10:51:43 AM.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Project "C:\Users\mtc\source\repos\onednn\build\CMakeFiles\3.23.1\VCTargetsPath.vcxproj" on node 1 (default targets).&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(460,5): error MSB8020: The build tools for Intel(R) oneAPI DPC++ Compiler (Platform Toolset = 'Intel(R) oneAPI DPC++ Compiler') cannot be found. To build using the Intel(R) oneAPI DPC++ Compiler build tools, please install Intel(R) oneAPI DPC++ Compiler build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\mtc\source\repos\onednn\build\CMakeFiles\3.23.1\VCTargetsPath.vcxproj]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Done Building Project "C:\Users\mtc\source\repos\onednn\build\CMakeFiles\3.23.1\VCTargetsPath.vcxproj" (default targets) -- FAILED.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Build FAILED.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"C:\Users\mtc\source\repos\onednn\build\CMakeFiles\3.23.1\VCTargetsPath.vcxproj" (default target) (1) -&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(PrepareForBuild target) -&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(460,5): error MSB8020: The build tools for Intel(R) oneAPI DPC++ Compiler (Platform Toolset = 'Intel(R) oneAPI DPC++ Compiler') cannot be found. To build using the Intel(R) oneAPI DPC++ Compiler build tools, please install Intel(R) oneAPI DPC++ Compiler build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Users\mtc\source\repos\onednn\build\CMakeFiles\3.23.1\VCTargetsPath.vcxproj]&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;0 Warning(s)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;1 Error(s)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Time Elapsed 00:00:00.15&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;Exit code: 1&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Visual Studio 2022 17.3.3&lt;/P&gt;
&lt;P&gt;Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2022.1.0 Build 20220316&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 18:13:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1412495#M2477</guid>
      <dc:creator>Kiefer_Kuah</dc:creator>
      <dc:date>2022-09-02T18:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using Intel Compiler 2022 as a toolset in cmake not working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1412774#M2481</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for posting in Intel Communities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please use the below cmake command and let us know if it helps?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;mkdir build &amp;amp;&amp;amp; cd build
cmake -DCMAKE_CXX_COMPILER=dpcpp -GNinja ..&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We tried at our end and we were able to build the application successfully as shown in the screenshot attached.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SantoshY_Intel_0-1662375584758.png" style="width: 400px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/33129i5044028AEF48884C/image-size/medium?v=v2&amp;amp;px=400&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="SantoshY_Intel_0-1662375584758.png" alt="SantoshY_Intel_0-1662375584758.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 11:00:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1412774#M2481</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2022-09-05T11:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using Intel Compiler 2022 as a toolset in cmake not working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1413310#M2485</link>
      <description>&lt;P&gt;Thanks but it doesn't work. Can you provide a way to use cmake with generator -G "Visual Studio 17 2022" instead of Ninja?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cmake .. -G Ninja -DDNNL_CPU_RUNTIME=DPCPP
-- CMAKE_BUILD_TYPE is unset, defaulting to Release
CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 16:34:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1413310#M2485</guid>
      <dc:creator>Kiefer_Kuah</dc:creator>
      <dc:date>2022-09-07T16:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using Intel Compiler 2022 as a toolset in cmake not working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1414122#M2495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please use the below exact command and let us know if it resolves your issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cmake .. -G "Visual Studio 17 2022" -DCMAKE_CXX_COMPILER=dpcpp -DCMAKE_BUILD_TYPE="Debug"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We tried at our end and it is working as expected. Please find the below screenshot.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-09-12 122307.png" style="width: 999px;"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/33293iD4B1DE37DF6E755E/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="Screenshot 2022-09-12 122307.png" alt="Screenshot 2022-09-12 122307.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 08:34:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1414122#M2495</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2022-09-12T08:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Intel Compiler 2022 as a toolset in cmake not working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1415046#M2520</link>
      <description>&lt;P&gt;We tried the command line you recommended and got the same output as you showed in your screenshot. However, how do you know that cmake has configured the project to use Intel Compiler? The screenshot you shared did not contain any reference to Intel Compiler? Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 18:02:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1415046#M2520</guid>
      <dc:creator>Kiefer_Kuah</dc:creator>
      <dc:date>2022-09-15T18:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using Intel Compiler 2022 as a toolset in cmake not working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1415179#M2521</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies for the miscommunication. The command provided in the previous response indeed uses the MSVC compilers but not Intel compilers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;&lt;EM&gt;&amp;gt;&amp;gt;"Can you provide a way to use cmake with generator -G "Visual Studio 17 2022" instead of Ninja?"&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The only CMake generator that supports oneAPI DPC++ Compiler on Windows is Ninja.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use Intel oneAPI DPC++ compiler, then please follow the steps mentioned in the below link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://oneapi-src.github.io/oneDNN/dev_guide_build.html#id1" target="_blank" rel="noopener"&gt;https://oneapi-src.github.io/oneDNN/dev_guide_build.html#id1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the Intel NextGen Compiler, could you please use the below command:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;cmake -G "Visual Studio 17 2022" -T "Intel C++ Compiler 2022" ..&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this resolves your issue, make sure to accept this as a solution. This would help others with similar issues. Thank you!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Santosh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 07:00:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1415179#M2521</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2022-09-16T07:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using Intel Compiler 2022 as a toolset in cmake not working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1415673#M2533</link>
      <description>&lt;P&gt;Can you update the links below which do not have documentation on "Intel C++ Compiler 2022". They only have documentation on previous Intel compilers? Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&lt;A class="sub_section_element_selectors" href="https://oneapi-src.github.io/oneDNN/dev_guide_build.html#windows" target="_self" rel="nofollow noopener noreferrer"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;oneDNN build documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&lt;A class="sub_section_element_selectors" href="https://www.intel.com/content/www/us/en/developer/articles/technical/using-oneapi-compilers-with-cmake-in-visual-studio.html" target="_self" rel="nofollow noopener noreferrer"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;Configuring CMake* and Microsoft Visual Studio* 2019 for Use with Intel Compilers&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="sub_section_element_selectors"&gt;&lt;SPAN class="sub_section_element_selectors"&gt;Is it possible to add Visual Studio as a cmake generator for oneAPI DPC++ compiler, like "Intel C++ Compiler 2022"? Visual Studio is not only a widely used compiler, but an IDE, debugger, profiler, etc. It's an indispensable tool. The project we're trying to add oneDNN and DPC++ code uses Visual Studio solution generated from cmake.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 18:16:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1415673#M2533</guid>
      <dc:creator>Kiefer_Kuah</dc:creator>
      <dc:date>2022-09-19T18:16:20Z</dc:date>
    </item>
    <item>
      <title>Re:Using Intel Compiler 2022 as a toolset in cmake not working</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1415857#M2536</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting our solution. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for your feedback. We have provided your feedback to the relevant team.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Sep 2022 06:28:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Using-Intel-Compiler-2022-as-a-toolset-in-cmake-not-working/m-p/1415857#M2536</guid>
      <dc:creator>SantoshY_Intel</dc:creator>
      <dc:date>2022-09-20T06:28:55Z</dc:date>
    </item>
  </channel>
</rss>

