[CMake] Intel fortran compiler, cmake and windows

Arjen Markus arjen.markus at wldelft.nl
Fri Nov 30 02:33:53 EST 2007


Alin M Elena wrote:

>Hi,
>
>I try to use cmake (cvs 29/11/2007), intel fortran compiler (10.1 september
>build) on a windows vista machine.
>
>The intel fortran compiler works. I have tested it in both command line and
>visual studio 2005 professional modes.
>Cmake works fine with Microsoft c++ and intel c++ compilers.
>
>When I try to use cmake and ifort I get the following error
>
>
>-- Check for working Fortran compiler: C:/Program
>Files/Intel/Compiler/Fortran/10.1.011/IA32/Bin/ifort.exe
>-- Check for working Fortran compiler: C:/Program
>Files/Intel/Compiler/Fortran/10.1.011/IA32/Bin/ifort.exe -- broken
>CMake Error: The Fortran compiler "C:/Program
>Files/Intel/Compiler/Fortran/10.1.011/IA32/Bin/ifort.exe" is not able to
>compile a simple test program.
>Determining if the Fortran compiler works failed with the following output:
>  
>
I am sure you thought of it, but as I myself regularly forget, I want to 
mention the following:

To use the Intel Fortran compiler (or the Compaq Visual Fortran compiler 
or MS Visual C/C++ compiler)
in a DOS-box, you need to run the corresponding batch file that sets the 
environment variables first.
Something like:

 > ifvars32.bat
(Message to the effect that the Intel Fortran Compiler can now be 
properly used)
 > cmake ....

The thing is, the compiler is found in the path set in the default 
environment, but not such variables as LIBPATH etc
that the compiler needs to find "ifconsol.lib" and the like.

(If you run these compilers via Visual Studio, the environment variables 
are set automatically, so you never
need to do that).

Perhaps this helps,

Arjen




More information about the CMake mailing list