Brad King a écrit :
Philippe Poilbarbe wrote:
Hello,

...
F90: error: Switch '-o' is ambiguous
...
The fortran compiler if Compaq Fortran 6.1 and it
...
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.
Thanks.

I have made a Windows-f90.cmake file which is read instead of the default one.
But now it seems that file names are not correctly generated by TRY_COMPILE
in CMakeTestFortranCompiler.cmake.
I can't trap why since the generated files in CMakeFiles/CMakeTmp are
removed too quickly :)


Is there an option of CMake allowing to keep temporary files ?



With 'NMake Makefiles' generator (the one I normally use), the
error is:
====================
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 @C:\DOCUME~1\Chef\LOCALS~1\Temp\nma00560.
F90: error: Unknown switch: '/cmTryCompileExec.dir'
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.
====================

Is seems that path of file contains '/' instead of '\' (and compiler doesn't like at all

With 'Visual Studio 6' generator, it works or not (but I don't know why). When
an error occurs the message is:
====================
Determining if the Fortran compiler works failed with the following output:
--------------------Configuration: cmTryCompileExec - Win32 Debug--------------------
Building Fortran object testFortranCompiler.obj
C:develBRATCMakeFilesCMakeTmptestFortranCompiler.f
f90: Severe: No such file or directory
... file is 'C:develBRATCMakeFilesCMakeTmptestFortranCompiler.f'
Error executing c:\windows\system32\cmd.exe.

cmTryCompileExec.exe - 1 error(s), 0 warning(s)
====================
It seems that no directory separator at all is generated... strange.


Note: I can send the Windows-f90.cmake file (I did not include it
because of it's size).

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to