[Gmsh-announce] Gmsh: switch to CMake
cgeuzaine at ulg.ac.be
Fri Aug 14 10:28:06 CEST 2009
All - I have just merged a patch in CVS that replaces our venerable
autoconf-based ("configure") build system with CMake (http://www.cmake.org).
CMake will hopefully solve a lot of the small-but-time-consuming
maintenance issues we had with autoconf:
- CMake can generate either classical makefiles or project files for
IDEs like Visual Studio, Eclipse and Xcode. This allows us to remove
all the hacks/scripts needed to compile Gmsh on non-Unix systems. This
is the main reason for switching to CMake.
- CMake tracks dependencies automatically, so there is no need anymore
for "make depend" or "make clean".
- CMake allows (and recommends) to perform "out-of-source" builds. This
has two advantages: 1) the source tree is not polluted by configuration,
object, library or binary files, and 2) one can develop and test several
build variants (GUI/library, optimized/debug, etc.) from the same source
tree at the same time.
- The CMake configuration files (CMakeLists.txt) are fairly easy to
understand--at least a lot less tricky to write than the autoconf
stuff. Hopefully this will allow more people to change/fix them if
- If we ever want to switch the main GUI to Qt, getting all the
cross-plaform bits working will be much easier with CMake than with
- Other goodies that we might use in the future include CPack (for
packaging) and CTest+CDash (for test automation+reporting).
I have tested the new CMake system on Windows with Visual Studio 2008,
on Mac with classical makefiles and Xcode, and on Linux with classical
makefiles. I have tried to add most of the configuration options we had
in the old system, but of course this is still very new... so there are
probably some bugs to iron out.
And of course if you have never used CMake before you will probably need
a few days to get used to it. The top-level README.txt contains basic
instructions on how to get started with CMake. Please let me know if you
find any problems. Comments and suggestions are very welcome!
PS: next step: switch from CVS to Git?
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
More information about the gmsh-announce