[Cmake] Using CMake for scientific computing ?
Christophe Dupre
duprec at scorec.rpi.edu
Wed Mar 12 16:22:32 EST 2003
I looked at your FAQ entry. I think I understand how it works, but I'm not
sure it would apply for Fortran code. According to the documentation, the
ADD_CUSTOM_TARGET command creates a new target that's always run. So if I
were to use that, my Fortran code would be recompiled each and every time.
I though the point of using Makefile was the automagic dependency
computation.
Even then, how would I avoid having one ADD_CUSTOM_COMMAND per fortran
source code ?
Just to make sure we understand each other, I'm not talking about a single
fortran file, but complete projects made in Fortran, without a single line
of C/c++ code.
Also, is there a way to NOT have to specify each file in the CMakeLists ?
I'd like to say 'compile everything in ./src and make a library out of
it'. I tried to use AUX_SOURCE_DIRECTORY, but the documentatiojn isn't
clear on its purpose.
On 12 Mar 2003, Andy Cedilnik wrote:
> Hi Christophe,
>
> For start, look at my comment in FAQ 5.1. There is example for latex.
> For Fortran it will be similar, unfortunately you will have to know
> Fortran flags.
>
> On Wed, 2003-03-12 at 15:51, Christophe Dupre wrote:
> > > 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 :-)
>
> > > 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.
>
> In VTK we search for MPI on common locations. The user who wants to
> build it does not need to know about MPI. Unfortunately, somebody has to
> type mpi flags there. You can guesstimate the flags and write them in
> the CMake files.
>
> Andy
>
>
--
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