[CMake] Compaq Fortran 6.1 detection fails under Windows
Brad King
brad.king at kitware.com
Mon Jun 19 11:38:13 EDT 2006
Philippe Poilbarbe wrote:
> Hello,
>
> I am trying to compile fortran code under Windows.
> When the Fortran language is enabled, the fortran checking routine shows
> the following error:
>
> Determining if the Fortran compiler works failed with the following output:
> nmake -f CMakeFiles\cmTryCompileExec.dir/build.make /nologo
> -L CMakeFiles\cmTryCompileExec.dir\build
> Building Fortran object
> CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.obj
> C:\PROGRA~1\MICROS~2\DF98\BIN\F90.EXE -o
> CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.obj -c
> C:\devel\BRAT\CMakeFiles\CMakeTmp\testFortranCompiler.f
> F90: error: Switch '-o' is ambiguous
> NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~2\DF98\BIN\F90.EXE' :
> return code '0x1'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
> Studio\VC98\BIN\nmake.exe"' : return code '0x2'
> Stop.
>
> Did somebody have the same kind of problem and solved it ?
>
> The fortran compiler if Compaq Fortran 6.1 and it
> does not seem to have a -o option (f90 -help command
> output is below).
> CMake version: 2.4.2
That compiler is not known to CMake. You'll have to set the variable
CMAKE_Fortran_COMPILE_OBJECT to teach CMake how to use the compiler.
Look at the Modules/Platform/Windows-ifort.cmake file in the CMake
installation for an example.
-Brad
More information about the CMake
mailing list