[CMake] Problem using Lahey Fortran Compiler
Brad King
brad.king at kitware.com
Thu Dec 9 12:56:20 EST 2010
On 12/09/2010 08:06 AM, pellegrini wrote:
> I would like to build a Fortran static library using the Lahey Fortran Compiler.
[snip]
> - why the compiler identification is unknown as Lahey compiler is
> normally supported by CMake ? Is it really supported ?
As of CMake 2.8.3 there is no support for this compiler. Adding support
requires some platform information files in CMake's Modules directory.
If you want to try it, the following should get you started.
(1) CMake needs to be able to identify the compiler. If the compiler
defines a preprocessor macro to identify it then add an entry to
"CMakeFortranCompilerId.F.in". Otherwise, add an entry to the
CMAKE_Fortran_COMPILER_ID_VENDORS table in
CMakeDetermineFortranCompiler.cmake. In either case, choose a short
c-identifier-like string to serve as the "id" for the compiler, such
as "Lahey".
(2) CMake needs to know the basic compiler flags. Generic cross-platform
flags should go in Modules/Compiler/<id>-Fortran.cmake where <id> is the
compiler id chosen in step 1. Windows-specific information should go
in Modules/Platform/Windows-<id>-Fortran.cmake. See the information for
other compilers for example.
Feel free to ask me for help. If you get this working please send me
the changes for inclusion in upstream CMake.
> - why the test crashed as when I go to the CMakeTmp directory and run
> explicitely the compilation of the test
> program (BTW a simple "hello world") the compilation works ?
The build tree created in CMakeTmp is optimized for internal CMake
checks and is not meant for direct build on the command line.
-Brad
More information about the CMake
mailing list