- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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
dev stack version:
oneAPI2023 + MVS2022 + CMake 3.30.2
(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)
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:
```python
if cpp_compiler_param == "icl23" and build_environment == "vs2022":
args_cmake_call.append("-DCMAKE_GENERATOR_TOOLSET=Intel C++ Compiler 19.2")
if cpp_compiler_param == "icx23" and build_environment == "vs2022":
args_cmake_call.append("-DCMAKE_GENERATOR_TOOLSET=Intel C++ Compiler 2023")
```
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=<compiler>` option to choose between ifort and ifx.
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=<compiler>` after having setup the toolset for C++ CMake crashes saying there is a conflict.
Any hints? Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found the solution by trial and error ... using the "," to set the Fortran compiler was enough
"-DCMAKE_GENERATOR_TOOLSET=Intel C++ Compiler 2023,fortran=ifx"
Sorry and thanks,
It might be useful for other users
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found the solution by trial and error ... using the "," to set the Fortran compiler was enough
"-DCMAKE_GENERATOR_TOOLSET=Intel C++ Compiler 2023,fortran=ifx"
Sorry and thanks,
It might be useful for other users

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page