[CMake] Intel fortran compiler, cmake and windows

Dunlavy, Daniel M dmdunla at sandia.gov
Thu Nov 29 18:55:12 EST 2007


Hi Alin,
 
I have posted the same problem on this list and the response was that my
Intel Fortran Compiler was probably not setup correctly. But I do not
think that is the case. Either way, here is my work-around for this
problem:

1) Install the Intel Fortran Compiler to a directory with no spaces in
the full path to the "bin" directory. The default is "C:\Program
Files\Intel". I installed mine to "C:\Intel" (I had to uninstall the
previously installed one, and then re-install using this path (using
Custom Install) in order for the installer to use the new path.)

2) Add the paths to the "Include", "Bin" and "Lib" directories of the
Intel Fortran compiler to several environment variables (Control
Panel->System->Advanced->Environment Variables->System Variables). With
the Intel Fortran compiler is located in
"C:\Intel\Compiler\Fortran\10.1.011\IA32", here are the environment
variables that I changed:

IFORT_COMPILER10: C:\Intel\Compiler\Fortran\10.1.011\
INCLUDE: C:\Intel\Compiler\Fortran\10.1.011\IA32\Include
LIB: C:\Intel\Compiler\Fortran\10.1.011\IA32\Lib
LIBPATH: C:\Intel\Compiler\Fortran\10.1.011\IA32\Lib
Path:
C:\Intel\Compiler\Fortran\10.1.011\IA32\Bin;C:\Intel\Compiler\Fortran\10
.1.011\IA32\Lib

3) Add the path to the Intel Fortran compiler's "Lib" directory to the
LINK_DIRECTORIES at the top of the "Windows-ifort.cmake" module in the
"share\cmake-x.x\Modules\Platform" subdirectory of your CMake
distribution (change "x.x" to your CMake version). Here is the line in
mine:

LINK_DIRECTORIES(C:/Intel/Compiler/Fortran/10.1.011/IA32/Lib)


I hope this works for you. Please let me know.

--Danny Dunlavy

> -----Original Message-----
> From: cmake-bounces+dmdunla=sandia.gov at cmake.org 
> [mailto:cmake-bounces+dmdunla=sandia.gov at cmake.org] On Behalf 
> Of Alin M Elena
> Sent: Thursday, November 29, 2007 4:31 PM
> To: cmake at cmake.org
> Subject: [CMake] Intel fortran compiler, cmake and windows
> 
> 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:
> 
> 
> Microsoft (R) Visual Studio Version 8.0.50727.867.
> 
> Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
> 
> 1>------ Build started: Project: cmTryCompileExec, 
> Configuration: Debug
> Win32 ------
> 
> 1>Building Fortran object testFortranCompiler.obj
> 
> 1>Linking Fortran target cmTryCompileExec.exe
> 
> 1>ipo: error #11035: Fatal error cannot open ifconsol
> 
> 1>ifort: error #10014: problem during multi-file optimization 
> 1>compilation
> (code 1)
> 
> 1>Project : error PRJ0019: A tool returned an error code from "Linking
> Fortran target cmTryCompileExec.exe"
> 
> 1>Build log was saved at "file://c:\Users\Alin M
> Elena\tdtbuj\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\Bu
> ildLog.htm"
> 
> 1>cmTryCompileExec - 3 error(s), 0 warning(s)
> 
> ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 
> skipped ==========
> 
> I also attach the CMakeCache.txt
> 
> 
> Any thoughts?
> 
> Alin
> 
> ____________________________________________________________________
> "...if the universities will not study useless subjects, who will?"
>                            G. F. Fitzgerald, Nature, 45/46, 
> 392 (1892) 
> ______________________________________________________________________
> Mr. Alin M. ELENA
> Atomistic Simulation Centre
> School of Mathematics and Physics
> Queen's University Belfast
> Office: +44 (0)28 9097 1428
> Fax: +44 (0)28 9097 5359
> http://titus.phy.qub.ac.uk/group/Alin/
> alin.elena at yahoo.co.uk
> alin.elena at qub.ac.uk
> ______________________________________________________________________
> 
> 



More information about the CMake mailing list