[GRASS-dev] cmake

I am not advocating move GRASS to it, as the build system seems to work
pretty well, but I would like to hear about the pros/cons of using cmake
instead of automake?

thanks,
Hamish

Dear Hamish,

Hamish schrieb:

I am not advocating move GRASS to it, as the build system seems to work
pretty well, but I would like to hear about the pros/cons of using cmake
instead of automake?

Cmake is a cross plattform make system.
http://www.cmake.org/HTML/Features.html

In the company i'm working, we use cmake to compile VTK/Qt projects
on Windows and Unix boxes.
And we do this with only one Cmake file for all plattforms.
And this works very well. On Linux boxes Makefiles are generated, on windows boxes MS Visual C++ project files are generated by cmake.

Cmake is IMHO much easier to code then the autotools stuff.
So hopefully many more devs will be able to fixe build system issues.
Cmake is written in pure C++, so you only need a C++ compiler to get it to run, there are no other dependencies.
The Makefiles which are generated are very sophisticated, on my dual cpu machine at work cmake decides automatically how to compile independent libs in parallel, if you type make -j4. So not only the compiling is parallel also the linking.

Cmake supports the software quality assurance system Dart (http://public.kitware.com/Dart/HTML/Index.shtml)
and also testing frameworks.
Cmake is open source!

And with cmake a VTK/GRASS interface will be much easier to implement. :slight_smile:

But the cmake config procedure is a bit different from the configure
system and we all have to learn a new build system.

I would like to see that grass switches from autotools to cmake.
And i would be happy to support this step.
Also if we want to establish GRASS on windows systems, this will
be valuable.

There is a nice article why KDE switched to cmake:
http://lwn.net/Articles/188693/

Best regards
Soeren

thanks,
Hamish

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Sorry, i forgot an important feature:
with cmake "out-of-source build" is the rule! :slight_smile:

Hamish schrieb:

I am not advocating move GRASS to it, as the build system seems to work
pretty well, but I would like to hear about the pros/cons of using cmake
instead of automake?

thanks,
Hamish

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Sören Gebbert wrote:

> I am not advocating move GRASS to it, as the build system seems to work
> pretty well, but I would like to hear about the pros/cons of using cmake
> instead of automake?

Cmake is written in pure C++, so you only need a C++ compiler to get it
to run, there are no other dependencies.

On some platforms, requiring a (working) C++ compiler is a fairly
signficant hurdle. We still aim to support any Unix platform which
isn't irreparably broken (by which, I mean Ultrix, Xenix, platforms
with 16-bit "int"s or anything without an ANSI C compiler). Simply
lacking a functional g++ port doesn't count.

I would like to see that grass switches from autotools to cmake.

GRASS doesn't use autotools in any signficant sense.

It uses autoconf to generate the configure script, but the configure
script is included in source tarballs and in CVS, so the user doesn't
need to have autoconf installed in order to compile GRASS. Developers
only need autoconf if they want to modify configure.in.

GRASS doesn't use automake, autoheader, libtool etc.

And i would be happy to support this step.
Also if we want to establish GRASS on windows systems, this will
be valuable.

On (native) Windows, the requirement to use GNU make is the least of
the hurdles. You need a Bourne shell and fileutils to even use GRASS,
let alone compile it, and that isn't likely to change in the
foreseeable future.

--
Glynn Clements <glynn@gclements.plus.com>