[Cmake] Using CMake for scientific computing ?

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


On 12 Mar 2003, Andy Cedilnik wrote:

> Hi Christophe,
>
> Let me try to answer some of your concerns.
>
> On Wed, 2003-03-12 at 15:12, Christophe Dupre wrote:
> > 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 ?
>
> CMake does not have direct support for Fortran, but if you know the
> syntax of Fortran compiler, you can make it. For example, I added
> support for Java and LaTeX like that. If you want, I can demonstrate
> that.

Yes, some pointers would be appreciated. The second part is not important
as long as Fortran doesn't work :-)

> > 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 ?
>
> Do you want to do that during compiling?
> You can set CMake options during configure step. This is how we do it
> for example in VTK. VTK can be build using MPI and you select that while
> configuring VTK.

At the compilation step, the developper should know which implementation
of MPI he wants to use. But I don't want him to have to know the exact
path where MPI is located, or what CFLAGS/LDFLAGS/libraries are needed to
compile with MPI. Right now we don't use mpicc/etc, we call the compilers
directly.


--
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