Fork me on GitHub

Reworked cmake files for Telemac

The cmake-files got some improvements with regards to MPI handling, building MPI related executables and automatic finding of Fortran source files.

If an existing MPI installation is found by the cmake system, the sources in the parallel directory will automatically be build. This applies to the parallel library as well as to gretel. Partel will only be build if libmetis.a is found in either one of the following directories:

/usr/lib
/usr/local/lib
parallel

So far this has only been tested with openmpi and gfortran.

Another improvement has been done to the handling of Fortran source files. They now will be found automatically by their .f extension. If a file needs to be excluded from the build, this can be achieved by the follwing lines in the cmake file:

     
#create a list with files to be excluded:
file(GLOB to_remove exclude1.f exclude2.f)
#and remove from source list:
list(REMOVE_ITEM CTR_SOURCES ${to_remove})
     
     

Currently there's an example in artemis and sisyphe.

There has also been a change to the install prefix naming. The formerly used $PROJECT environment variable is no longer used. Instead $CMAKE_SOURCE_DIR is used so that the default installation will be done in the source directory. This can easily be overridden by defining a different installation prefix when calling cmake.

Have fun!

ogoe Monday 08 August 2011 at 12:30 pm | | Blog
Used tags: ,

No comments

(optional field)
(optional field)

Comment moderation is enabled on this site. This means that your comment will not be visible until it has been approved by an editor.

Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.