CMake selects wrong version of Intel Fortran Compiler if 2 are installed
Hi there,
I have slightly annoying CMake issue on Windows.
My Windows setup:
- Intel Fortran 2020 (19.1.0) and Intel Fortran 2020 Update 2 (19.1.2) installed side-by-side
- CMake-3.18.1
- Visual Studio 2017
- ninja
When running cmake-gui from 'Intel Fortran 19.1.0 and VS 2017 Compiler Environment' and selecting ninja as a generator, cmake will correctly select Intel Fortran 19.1.0 as Fortran compiler:
The C compiler identification is MSVC 19.16.27039.0
The CXX compiler identification is MSVC 19.16.27039.0
The Fortran compiler identification is Intel 19.1.0.20191121
But when running cmake-gui from the same 'Compiler Environment' and selecting VS2017 as a generator, cmake will incorrectly select Intel Fortran 19.1.2 as Fortran compiler:
Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363.
The C compiler identification is MSVC 19.16.27039.0
The CXX compiler identification is MSVC 19.16.27039.0
The Fortran compiler identification is Intel 19.1.2.20200623
I currently handle this issue by having only one Intel Fortran compiler installed. In this case everything works as expected. But I would like to have 2 (or more) Intel Fortran compilers installed side-by-side when e.g. I am testing new version of compiler.