[Cmake] Using CMake for scientific computing ?

Christophe Dupre duprec at scorec.rpi.edu
Wed Mar 12 15:12:57 EST 2003


Hello,
we are considering CMake to replace our custom GNU Make-based build
system. Right off the bat, it looks to me that CMake has no support for
Fortran code. Is that still the case ? Is anyone working to add that
functionality ? Would it be very hard to add ?

The other thing is we'd like to have really good control over which
compiler is used, which compiler flags are used, etc. To be more specific,
we have N modules (each either a library or executable) that right now can
be compiled on several platforms (Cygwin, Linux, Solaris, Irix, etc), and
for each platform we support many compilers (Linux has gcc, icc and pgcc
for example). Many programs also have two versions : one parallel and one
serial. The parallel version usually has to be compiled against an
implementation of MPI, but each system usually has many available.

Right now, those choices are done at compile time using command-line
argument:

gmake VERS=opt ARCHOS=x86_linux-icc PARALLEL=mpich

The set of Makefiles derive the compiler and CFLAGS from the VERS and
ARCHOS arguments. The PARALLEL switch tells it also which version of MPI
to use. Lots of things are hard-coded in the Makefiles, and while it works
really well here it's not really portable. It also doesn't really work
well under Windows.

However, one nice thing is that developpers don't have to bother about
knowing the specifics of each compiler, the build system takes care of
knowing which command-line argument to use for debugging, profiling,
optimizing for all the platforms.

What would be the right way to port this to CMake ?


--
Christophe Dupre
System Administrator, Scientific Computation Research Center
Rensselaer Polytechnic Institute
Troy, NY        USA
Phone: (518) 276-2578  -  Fax: (518) 276-4886




More information about the CMake mailing list