I have tried adding this path to LIB, PATH, and INCLUDE and still have the same problem unless I put the LINK_DIRECTORIES command in Windows-ifort.cmake.
I can also run the commands that are being run in CMakeTestFortranCompiler.cmake in any CMD shell and there is no problem. So ifort works from a CMD shell, but not from within CMake. Below is the error from Cmake. I have altered the CMakeTestFrotranCompiler.cmkae module to output the three environment variables I mentioned above. Note that they all contain the directory for the libraries (ie.e the one I use in the LINK_DIRECTORIES command). Unfortunately, I am still at a loss to what to try next. Thanks, Danny -- Check for working Fortran compiler: C:/Intel/Compiler/Fortran/10.0.025/Ia32/Bin/ifort.exe -- Check for working Fortran compiler: C:/Intel/Compiler/Fortran/10.0.025/Ia32/Bin/ifort.exe -- broken CMake Error: The Fortran compiler "C:/Intel/Compiler/Fortran/10.0.025/Ia32/Bin/ifort.exe" is not able to compile a simple test program. It fails with the following output: Microsoft (R) Visual Studio Version 8.0.50727.762. Copyright (C) Microsoft Corp 1984-2005. All rights reserved. ------ Build started: Project: cmTryCompileExec, Configuration: Debug Win32 ------ Building Fortran object testFortranCompiler.obj Linking Fortran target cmTryCompileExec.exe LINK : fatal error LNK1104: cannot open file 'ifconsol.lib' Project : error PRJ0019: A tool returned an error code from "Linking Fortran target cmTryCompileExec.exe" Build log was saved at "file://c:\Documents and Settings\dmdunla\My Documents\work\dev\build\trilinos\epetra-win32\CMakeFiles\CMakeTmp\cmTry CompileExe c.dir\Debug\BuildLog.htm" cmTryCompileExec - 2 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ========== INCLUDE = C:\Intel\Compiler\Fortran\10.0.025\Ia32\Include;C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visu al Studio 8\VC\INCLUDE;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\include LIB = C:\Intel\Compiler\Fortran\10.0.025\Ia32\Lib;C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio 8\ VC\LIB;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;C:\Program Files\SQLXML 4 .0\bin\ PATH = C:\Intel\Compiler\Fortran\10.0.025\Ia32\Bin;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\V C\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\bin;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\bin;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program F iles\Microsoft Visual Studio 8\VC\VCPackages;C:\Program Files\Silverfrost\FTN95;.;C:\Program Files\Legato\nsr\bin;C:\Program Files\Intel\VTune\CGGlbCa che;C:\Program Files\Intel\VTune\Analyzer\Bin;C:\Program Files\Intel\VTune\Shared\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\s ystem32\wbem;c:\;c:\p rogram files\ati technologies\ati control panel;C:\Program Files\MATLAB\R2007b\bin;C:\Program Files\MATLAB\R2007b\bin\win32;C:\MATLAB71\bin\win32;c:\; c:\documents and settings\dmdunla\my documents\bin\tp;c:\program files\ghostgum\gsview;c:\gs\gs8.50\bin;C:\cygwin\bin;C:\cygwin\usr\bin;C :\Program Fil es\Diskeeper Corporation\Diskeeper\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Progr am Files\Microsoft SQL Server\90\DTS\Binn\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Intel\ Compiler\Fortran\10.0.025\IA32\Lib;C:\Program Files\CMa ke 2.4\bin;C:\Intel\Compiler\Fortran\10.0.025\\IA32\Lib;C:\Program Files\CMake 2.4\bin CMake will not be able to correctly generate this project. -- Configuring done > -----Original Message----- > From: Bill Hoffman [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 25, 2007 2:19 PM > To: Dunlavy, Daniel M > Cc: [email protected] > Subject: Re: [CMake] Problem building fortran project on > Windows using Intel Fortran 10 compiler > > Dunlavy, Daniel M wrote: > > Everything works if I add the following line to Windows-ifort.cmake: > > > > LINK_DIRECTORIES(C:/Intel/Compiler/Fortran/10.0.025/IA32/Lib) > > > > This is the path to the Intel Fortran Compiler libraries. Is this a > > bug that this directory is not being incorporated > automatically once > > the ifort compiler is found? > > > This sounds like an installation problem. CMake assumes that > ifort works. In your case it does not. Perhaps if you set > some environment variable like LIB to have this it would work? > > -Bill > > _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
