[CMake] Problem building fortran project on Windows using Intel Fortran 10 compiler

Dunlavy, Daniel M dmdunla at sandia.gov
Thu Oct 25 11:12:33 EDT 2007


I have tried all of the great suggestions on this list and I still have
the same problems. As I mentioned before, I have tried to configure the
Cmake Fortran test and get the same errors. I really think these errors
are path related, as the specific error states that the Fortran
libraries cannot be found when linking. Is anyone using Intel Fortran
10.0 and have had to do something path related in order for Cmake to
work properly?

I have tracked one problem down, finally, to a path issue. Because of
the space in the name of the library path, the path is split when it is
added to the link line:

ifort.exe /nologo /W1 testFortranCompiler.obj /FecmTryCompileExec.exe
-link /INCREMENTAL:YES /subsystem:console -LIBPATH:c:\Program
-LIBPATH:Files\Intel\Compiler\Fortran\10.0.025\IA32\Lib user32.lib

I have tried to re-install the Intel Fortran Compiler in a directory
without spaces, but it always resorts to installing in the same
directory: C:\Program Files\Intel\... I have tried to move the files,
but there must be something in the compiler setup that points to the
original directory, because it keeps choosing that directory for the
argument of -LIBPATH: in Cmake (even when the directory is gone).

Does anyone know of a workaround for handling library paths (or paths in
general) containing spaces on Windows? Can this be handled in one of the
Fortran modules (CMakeTestFortranCompiler.cmake or
Platform\Windows-ifort.cmake or some other)?

Thanks,
Danny

> -----Original Message-----
> From: Alan W. Irwin [mailto:irwin at beluga.phys.uvic.ca] 
> Sent: Wednesday, October 24, 2007 4:53 PM
> To: Dunlavy, Daniel M
> Cc: cmake at cmake.org
> Subject: RE: [CMake] Problem building fortran project on 
> Windows using Intel Fortran 10 compiler
> 
> On 2007-10-24 16:18-0600 Dunlavy, Daniel M wrote:
> 
> > Here is a copy of the CMakeLists.txt. I do not believe that 
> anything 
> > below ENABLE_LANGUAGE(Fortran) is causing the problem, as 
> CMakeSetup 
> > is choking on the Fortran tests run as a results of that command.
> 
> ENABLE_LANGUAGE has known general problems
> (http://www.cmake.org/Bug/view.php?id=4772) and also 
> additional specific problems for fortran (at least for the 
> g77 case, but perhaps other compilers as well, see 
> http://www.cmake.org/Bug/view.php?id=4773).
> 
> I suggest you work around the general ENABLE_LANGUAGE problem 
> by specifying the language(s) in the PROJECT statement 
> instead.  That should at least simplify the errors that you 
> see and might even solve them.
> 
> Alan
> __________________________
> Alan W. Irwin
> 
> Astronomical research affiliation with Department of Physics 
> and Astronomy, University of Victoria (astrowww.phys.uvic.ca).
> 
> Programming affiliations with the FreeEOS equation-of-state 
> implementation for stellar interiors (freeeos.sf.net); PLplot 
> scientific plotting software package (plplot.org); the 
> libLASi project (unifont.org/lasi); the Loads of Linux Links 
> project (loll.sf.net); and the Linux Brochure Project 
> (lbproject.sf.net).
> __________________________
> 
> Linux-powered Science
> __________________________
> 
> 



More information about the CMake mailing list