[Cmake] Using CMake for scientific computing ?

Andy Cedilnik andy.cedilnik at kitware.com
Wed Mar 12 15:34:17 EST 2003


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.

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

			Andy






More information about the CMake mailing list