[CMake] help with lahey (fortran) patch

Yngve Inntjore Levinsen yngve.levinsen at gmail.com
Tue Feb 26 03:53:18 EST 2013


Hello,

I am in the process of preparing a patch proposal for the Lahey/Fujitsu
Fortran compiler (lf95). As I am not a programming expert nor a cmake
expert, I tried to base myself on the already available files for
Intel/NAG and friends in the Modules directory.

Some specific questions in addition to general feedback:
- There is a MODDIR and MODPATH flag for cmake/fortran, what is the
difference? For lf95 the flag --mod can have a list of paths separated
by ':', while -M can only get one path. I believe the latter is where
the created modules are placed.
- Adding "--staticlink". For me that makes sense since you usually want
to distribute the binaries to people which does not have lf95 libraries
available. What is the preference for cmake though? I notice for Intel
you do the opposite, and explicitly say that you want to link
dynamically to the Intel libraries..
- Did I get the flags correctly done? It is working in my tests but
maybe I still did something wrong..
- There are some extra recommended flags for lf95 in the documentation,
should they be turned on or will they be too specific? See page 50-51 of
this pdf: http://www.lahey.com/docs/UsersGuideEXP73_revD05.pdf
- Will this be correct on Windows? I don't have a machine to test...
- Where would I submit the proposal?

I attach both the patch and the output of "lf95 --help", since I suppose
not many people actually have this compiler available.. There is a
freely available documentation on the web for the very curious, which
you can find here: http://www.lahey.com/doc.htm

Cheers,
Yngve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lahey.patch
Type: text/x-patch
Size: 3402 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130226/e76fbc89/attachment.bin>
-------------- next part --------------
usage: lf95 [@RESPFILE] [FILENAMES] [SWITCHES]
  @RESPFILE is a file containing switches, file names, or other response files
  FILENAMES are the names of source or object files
  SWITCHES are option switches

You may mix command line switches in any order.  They will be evaluated
from left to right, with the rightmost value used.

Option switches:
  --[n]ap                ensure consistent arithmetic precision
  --block <value>        set default block size for open statements
  -[n]c                  suppress linking
  --[n]chk               checking
  --[n]chkglobal         global checking
  --[n]co                display compiler options
  --[n]concc             support carriage control characters in console I/O
  -Cpp                   invoke C preprocessor
  --[n]dal               deallocate allocated arrays
  --[n]dbl               extend single precision reals to double precision
  --[n]f95               turn on F95 conformance warnings
  --file <name>          use <name> literally as a file name
  --[n]fix               assume fixed form
  -[n]g                  generate debugging information
  -I <dir>               directory containing include files
  --include <dir1:dir2...> directory(s) containing include files
  --[n]in                no implicit typing
  --[n]inline [<value>]  inline user-defined procedures
  --[n]info              display informational messages
  -l <name>              specify library to link
  -L <path>              specify directory to find library in
  --[n]li                Lahey intrinsic procedures
  --[n]long              extend integer*4 to integer*8
  --[n]lst               create source listings
  --[n]maxfatals <value> specify maximum fatal errors before stopping
  --ml cdecl             specify mixed language target
  --mldefault cdecl      specify default mixed language target
  -M <dir>               directory containing module files
  --mod <dir1:dir2...>   directory(s) containing module files
  --o0 | -O0             no optimizations
  --o1 | -O              classical, memory, and interprocedural optimizations
  --o2                   --o1 plus loop and array optimizations
  --out <name> | -o <name> specify output file name
  --[n]ocl               recognize Optimization Control Lines
  --[n]openmp            enable OpenMP directives
  --[n]parallel          automatic paralellization
  --[n]pca               protect constant arguments
  --[n]prefetch          Athlon and Pentium III optimizations
  --[n]private           set default private accessability
  --[n]quad              extend double precision reals to quad precision
  --[n]quiet             quiet compilation
  --[n]sav               save local variables
  --[n]shared            generate a shared library
  --[n]sse2              optimize using SSE2 instructions
   -static               link with static libraries only
  --[n]staticlink        static link LF95 run-time only, dynamic link system
  --[n]swm <args>        suppress warning messages
  --t4                   generate 486 code
  --tp                   generate Pentium code
  --tpp                  generate Pentium Pro code
  --tp4                  generate Pentium 4 code
  --threadheap <value>   allocate thread storage on heap
  --threads <value>      number of threads
  --[n]trace             enable runtime error traceback
  --[n]trap              trap ndp exceptions
  --[n]unroll <value>    perform/control loop unrolling
  --[n]varheap <value>   allocate local variables on heap
  --[n]verbose           verbose mode
  --[n]version           display version information
  --[n]warn              display warnings
  --[n]wide              wide fixed-source format
  --[n]wisk              use Winteracter Starter Kit
  --[n]wo                warn if obsolescent feature
   -x arg                inline code
  --[n]xref              create cross reference listings
  --[n]zfm               use zero flush mode of SIMD floating point


More information about the CMake mailing list