<?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 Seeting up CMake with oneAPI23+MVS2022 to switch between classic and LLVM compilers (Fortran/C++) in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Seeting-up-CMake-with-oneAPI23-MVS2022-to-switch-between-classic/m-p/1621511#M173193</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to upgrade my build system to enable building MVS2022 projects in which I can switch between classic and LLVM compilers but I am hitting an issue with CMake&lt;/P&gt;&lt;P&gt;dev stack version:&lt;/P&gt;&lt;P&gt;oneAPI2023 + MVS2022 + CMake 3.30.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I'm working with oneAPI23 because it is the last to offer both version for the C++ compilers which I need to validate before moving to LLVM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a python script that enables me to setup the whole building process (large project) where, to change between classic C++ and LLVM I would setup something like:&lt;/P&gt;&lt;P&gt;```python&lt;/P&gt;&lt;P&gt;if cpp_compiler_param == "icl23" and build_environment == "vs2022":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; args_cmake_call.append("-DCMAKE_GENERATOR_TOOLSET=Intel C++ Compiler 19.2")&lt;/P&gt;&lt;P&gt;if cpp_compiler_param == "icx23" and build_environment == "vs2022":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; args_cmake_call.append("-DCMAKE_GENERATOR_TOOLSET=Intel C++ Compiler 2023")&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;For Fortran I had no need to do anything before since there was just one compiler. Now, since CMake 3.29 there is the `-T fortran=&amp;lt;compiler&amp;gt;` option to choose between ifort and ifx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I simultaneously setup the generator toolset for C++ and Fortran to create different combinations? I haven't found a way to pass multiple fields to CMAKE_GENERATOR_TOOLSET in order to achive that. And if I try to append `-T fortran=&amp;lt;compiler&amp;gt;` after having setup the toolset for C++ CMake crashes saying there is a conflict.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any hints? Thank you&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2024 11:53:04 GMT</pubDate>
    <dc:creator>hkvzjal</dc:creator>
    <dc:date>2024-08-07T11:53:04Z</dc:date>
    <item>
      <title>Seeting up CMake with oneAPI23+MVS2022 to switch between classic and LLVM compilers (Fortran/C++)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Seeting-up-CMake-with-oneAPI23-MVS2022-to-switch-between-classic/m-p/1621511#M173193</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to upgrade my build system to enable building MVS2022 projects in which I can switch between classic and LLVM compilers but I am hitting an issue with CMake&lt;/P&gt;&lt;P&gt;dev stack version:&lt;/P&gt;&lt;P&gt;oneAPI2023 + MVS2022 + CMake 3.30.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I'm working with oneAPI23 because it is the last to offer both version for the C++ compilers which I need to validate before moving to LLVM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a python script that enables me to setup the whole building process (large project) where, to change between classic C++ and LLVM I would setup something like:&lt;/P&gt;&lt;P&gt;```python&lt;/P&gt;&lt;P&gt;if cpp_compiler_param == "icl23" and build_environment == "vs2022":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; args_cmake_call.append("-DCMAKE_GENERATOR_TOOLSET=Intel C++ Compiler 19.2")&lt;/P&gt;&lt;P&gt;if cpp_compiler_param == "icx23" and build_environment == "vs2022":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; args_cmake_call.append("-DCMAKE_GENERATOR_TOOLSET=Intel C++ Compiler 2023")&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;For Fortran I had no need to do anything before since there was just one compiler. Now, since CMake 3.29 there is the `-T fortran=&amp;lt;compiler&amp;gt;` option to choose between ifort and ifx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I simultaneously setup the generator toolset for C++ and Fortran to create different combinations? I haven't found a way to pass multiple fields to CMAKE_GENERATOR_TOOLSET in order to achive that. And if I try to append `-T fortran=&amp;lt;compiler&amp;gt;` after having setup the toolset for C++ CMake crashes saying there is a conflict.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any hints? Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 11:53:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Seeting-up-CMake-with-oneAPI23-MVS2022-to-switch-between-classic/m-p/1621511#M173193</guid>
      <dc:creator>hkvzjal</dc:creator>
      <dc:date>2024-08-07T11:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Seeting up CMake with oneAPI23+MVS2022 to switch between classic and LLVM compilers (Fortran/C++</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Seeting-up-CMake-with-oneAPI23-MVS2022-to-switch-between-classic/m-p/1621515#M173194</link>
      <description>&lt;P&gt;Found the solution by trial and error ... using the "," to set the Fortran compiler was enough&lt;/P&gt;&lt;P&gt;"-DCMAKE_GENERATOR_TOOLSET=Intel C++ Compiler 2023,fortran=ifx"&lt;/P&gt;&lt;P&gt;Sorry and thanks,&lt;/P&gt;&lt;P&gt;It might be useful for other users&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 12:10:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Seeting-up-CMake-with-oneAPI23-MVS2022-to-switch-between-classic/m-p/1621515#M173194</guid>
      <dc:creator>hkvzjal</dc:creator>
      <dc:date>2024-08-07T12:10:05Z</dc:date>
    </item>
  </channel>
</rss>

