[CMake] Recognising Compaq Visual Fortran compiler under Windows
Arjen Markus
arjen.markus at wldelft.nl
Fri Aug 11 08:04:50 EDT 2006
Philippe Poilbarbe wrote:
> Arjen Markus a écrit :
>
>> ...
>> -----
>> Determining if the Fortran compiler works failed with the following
>> output:
>>
>> Microsoft (R) Development Environment Version 7.10.3077.
>> Copyright (C) Microsoft Corp 1984-2001. All rights reserved.
>> ------ Build started: Project: cmTryCompileExec, Configuration: Debug
>> Win32 ------
>>
>> Building Fortran object testFortranCompiler.obj
>> F90: error: Switch '-o' is ambiguous
>> Project : error PRJ0019: A tool returned an error code from "Building
>> Fortran object testFortranCompiler.obj"
>> -----
>> ...
>
> It is because CMake does not handle Compaq fortran.
> It detects the compiler (f90.exe) but there is nothing indicating to
> cmake
> how to deal with it so it falls back to 'standard' options (-o instead
> of /out:).
>
> To allow CMake properly configuring itself to use Compaq Fortran, you
> have
> to put a file named Windows-f90.cmake in the Platform subdirectory
> of the Module directory (in CMake Installation) or of a directory
> defined in CMAKE_MODULE_PATH.
>
> Attached, you have one I wrote to correctly set the parameters for
> compaq f90 (I
> expect so :)).
> However, now there is another problem with, I think, '/' put in paths
> instead of '\'
> and f90 does not like at all, thinking that it is options.
> At now I do not have time to investigate more (see my thread
> "Compaq Fortran 6.1 detection fails under Windows" sent during june)
> it is
> why I did not give the solution.
Hello Philippe,
this looks like a useful starting-point anyway, so thank you for that.
CVF is not the only compiler that uses / as the start of options, MSVC does
the same thing - so CMake must be able to get this right somehow ...
Regards,
Arjen
More information about the CMake
mailing list