VS: Selecting Intel Fortran compiler version
In my setup there are VS2017, Intel Fortran Compiler 2017 and 2019. I would like to use Intel Fortran compilers 2017 based on the below setups:
- call VsDevCmd.bat from the Visual Studio
- call %IFORT_COMPILER17%bin\ifortvars.bat
- set FC to 2017 ifort.exe
- call cmake using NMAKE or Visual Studio generator
When running with NMAKE generator it works fine, Intel Fortran compiler 2017 was picked up correctly:
cmake -G"NMake Makefiles" -S "D:\source\code" -B "build\NMake Makefiles"
-- The C compiler identification is MSVC 19.12.25835.7
-- The CXX compiler identification is MSVC 19.12.25835.7
-- The Fortran compiler identification is Intel 17.0.6.20171215
But with Visual Studio generator CMake picks up Intel Compiler 2019:
cmake -G"Visual Studio 15 2017" -A"x64" -T"host=x64,version=14.12" -S "D:\source\code" -B "build\Visual Studio 15 2017"
-- The C compiler identification is MSVC 19.12.25835.7
-- The CXX compiler identification is MSVC 19.12.25835.7
-- The Fortran compiler identification is Intel 19.1.3.20201010
As we know when installing Parallel Studio for the Fortran compiler, the Parallel Studio installer does some integration with Visual Studio, could that integration somehow cause the issue?
Edited by Brad King