Re: [CMake] Problem using Lahey Fortran Compiler

2010-12-09 Thread Brad King
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/-Fortran.cmake where  is the
compiler id chosen in step 1.  Windows-specific information should go
in Modules/Platform/Windows--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
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Problem using Lahey Fortran Compiler

2010-12-09 Thread pellegrini

Hello everybody,

I would like to build a Fortran static library using the Lahey Fortran 
Compiler.


When building my project with the following command:

cmake -G "NMake Makefiles" -D CMAKE_Fortran_COMPILER=lf95 .. 
--debug-trycompile


the build crash with the following starting line:

-- The Fortran compiler identification is unknown
-- Check for working Fortran compiler: C:/LF9556/Bin/lf95.exe
-- Check for working Fortran compiler: C:/LF9556/Bin/lf95.exe  -- broken
CMake Error at 
C:/CMake2.8/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:40 
(MESSAGE):

 The Fortran compiler "C:/LF9556/Bin/lf95.exe" is not able to compile a
 simple test program.

 It fails with the following output:

  Change Dir: 
C:/Datas/Eclipse_Projects/Fortran/crysfml/build/lf95_release/CMakeFiles/CMakeTmp



So it seems that the building was not able to even pass the testing 
step. What I do not understand is:


 - why the compiler identification is unknown as Lahey compiler is 
normally supported by CMake ? Is it really supported ?
 - 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 ?

any idea

thansks

Eric





--
Eric Pellegrini
Calcul Scientifique
Institut Laue-Langevin
Grenoble, France

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake