[CMake] Compaq Visual Fortran

Arjen Markus arjen.markus at deltares.nl
Mon Feb 15 07:08:10 EST 2010


Hi Brad,

I created a new issue in the CMake tracker regarding the refactoring
of the file Windows-Compaq-Fortran.cmake, as you wil have seen.

I tried some further tests today and was rather astonished to see
it all fail ... with a message from the Compaq compiler that it
was passed a keyword to the -iface option that it could not
understand. There is no option -iface to be found anywhere, so it
was a very nasty riddle!

It took me some fiddling with versions of CMake and PLplot files before
I realised that the cause was the fact that I was compiling on the
F-disk of my laptop. So, the compile command turned out something
like:

     f90.exe /compile_only -IF:\plplot-svn\plplot\bindings\f77\strutils.f

Compaq Visual Fortran has an option /include or /I or -I but also an
option /iface:keyword or -IF:keyword.

In this particular constellation it is interpreting the options in the
wrong manner! Instead of -I "F:\plplot-svn\..." it interprets the option
as -IF:"\plplot-svn\plplot\..."

I am not sure if there are other compilers (except Intel Fortran) that
use an optional colon to separate option name from the keyword, but
the issue is wider than just this one:

What happens if someone puts the sources in a directory whose name
contains a space, like: "c:\my documents\my sources\" ?

Shouldn't all file names and directory names be properly delimited?

Regards,

Arjen


On 2010-02-02 13:38, Brad King wrote:

> 
> Rename Windows-f90.cmake to Windows-Compaq-Fortran.cmake and put it
> in your project under CMAKE_MODULE_PATH (under a Platform/ directory).
> This should enable support in your project without needing any patches
> to the current CMake in CVS HEAD.
> 
> Windows-f90.cmake in its current form is not ready for inclusion in
> upstream CMake as Windows-Compaq-Fortran.cmake.  It sets several
> variable that are not related specifically to Fortran.  We need to
> refactor it a bit.  Please submit a feature request in the issue
> tracker and include the module for further discussion.
> 
>> Note: I just saw there is already a Windows-df.cmake file in the
>> repository, but I guess "df.exe" is not used as the name for a
>> possible compiler.
> 
> That's a patch from you in 2006:
> 
>   http://www.cmake.org/Bug/view.php?id=3950
> 
> -Brad
> 


More information about the CMake mailing list