[CMake] Compaq Visual Fortran

Arjen Markus arjen.markus at deltares.nl
Tue Feb 16 10:21:08 EST 2010


Hi Brad,

thanks for this detailed explanation. I will try again with these
amendments.

(I detest the introduction of spaces in directory names and file names.
It messes up all manner of things! Yes, you are right, quotes won't
solve the issue.)

Regards,

Arjen

On 2010-02-16 16:12, Brad King wrote:
> Arjen Markus wrote:
>>     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\" ?
> 
> It will be quoted or converted to the windows "shortpath" format which
> never has spaces.  CMake quotes only when necessary (see below).
> 
> The documented way to change the include path flag to "-I " instead
> of just "-I" is:
> 
>   set(CMAKE_INCLUDE_FLAG_C "-I ")
>   set(CMAKE_INCLUDE_FLAG_CXX "-I ")
> 
> Reading the source, I see there is an undocumented way to force
> quoting of include paths:
> 
>   set(CMAKE_QUOTE_INCLUDE_PATHS 1)
> 
> One of the above should be added to the compiler information file for
> Compaq.
> 
>> Shouldn't all file names and directory names be properly delimited?
> 
> Quoting on windows is a PITA because programs receive one big command
> line string from the operating system on startup.  Most programs just
> let the runtime library parse the string to produce argv[] and call
> main, but some tools get the command line string and parse it themselves.
> 
> -Brad
> 


More information about the CMake mailing list