mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00

Intel oneAPI distributions no longer include the `ifort` compiler, but its Visual Studio Integration defaults to `ifort` if `ifx` is not explicitly specified in the `.vfproj` file. We cannot change the default Fortran compiler in VS 17 and older, but since the VS 18 generator is new, we can establish `ifx` as its default. This establishes working defaults on new versions of VS and oneAPI while retaining existing behavior on older versions. Issue: #26415
20 lines
761 B
ReStructuredText
20 lines
761 B
ReStructuredText
CMAKE_VS_PLATFORM_TOOLSET_FORTRAN
|
|
---------------------------------
|
|
|
|
.. versionadded:: 3.29
|
|
|
|
Fortran compiler to be used by Visual Studio projects.
|
|
|
|
:ref:`Visual Studio Generators` support selecting among Fortran compilers
|
|
that have the required Visual Studio Integration feature installed. The
|
|
compiler may be specified by a field in :variable:`CMAKE_GENERATOR_TOOLSET` of
|
|
the form ``fortran=...``. CMake provides the selected Fortran compiler in this
|
|
variable.
|
|
|
|
If the field was not specified, the default depends on the generator:
|
|
|
|
* On :generator:`Visual Studio 18 2026` and above, the default is ``ifx``.
|
|
|
|
* On older :ref:`Visual Studio Generators`, the default is empty, which the
|
|
Intel Visual Studio Integration interprets as equivalent to ``ifort``.
|