VS: 3.29.0 does not detect fortran={ifx,ifort}
CMake 3.29.0 added the ability to specify oneAPI (Intel[LLVM]) cmake -T fortran={ifx,ifort}
in !9001 (merged)
tl;dr: Windows MSVC users want to use MSVC for C/C++ with Intel oneAPI (IntelLLVM) Fortran and Visual Studio 17 2022 generator, but cannot do so even with CMake 3.29.
I still have the same problem when trying to use MSVC "cl.exe" for C/C++ with "ifx.exe" (IntelLLVM) or "ifort.exe" (Intel) Fortran compilers. In a popular CMake script project I have, I keep getting Windows users who use MSVC for C/C++ with the Intel oneAPI Fortran compiler with "Visual Studio 17 2022" generator who get this configure failure.
From scratch on a simple Windows laptop that works with MSVC with Ninja or Visual Studio 17 2022 (C/C++) or oneAPI (C/C++/Fortran) with Ninja, it does NOT work say from the oneAPI command prompt if I do
cmake -G "Visual Studio 17 2022" -T fortran=ifx
cmake_minimum_required(VERSION 3.29)
project(hi LANGUAGES Fortran)
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_Fortran_COMPILER could be found.
this is with CMake 3.29.0 binary downloaded from Kitware (not MSYS2 CMake).