[sldev] [VWR] Switch to cmake?

Bill Hoffman bill.hoffman at kitware.com
Fri Oct 19 04:49:34 PDT 2007


SL - Farallon Greyskin wrote:
> I wasn't going to really get into this too much. I don;t know the 
> intricacies of SLs current build system nor do I really want to :) But I 
> guess I'll just say my piece and let it go at that.
> 
> I worked on cross platform projects for 6 years up till a couple years 
> ago and in almost every case it became evident that the BEST way to do 
> cross platform building was to have a responsible party for the make 
> files for every platform and then use scripts to automate the builds 
> from a central location using build servers for each platform. Since the 
> make files and required library includes, build procedures, dependencies 
> etc.  are SO VERY platform specific, it became a chore try to commonize 
> them. Not a show stopper, but everyone was MUCH happier not doing that. 
> It just seemed like busy work that led to more work than solution in the 
> end.

That was the exact reason CMake was created.  To automate the "busy 
work".  CMake allows all the developers on a project to easily 
add/remove files and libraries in the build, not just the few makefile 
hackers.  In addition it makes it much easier to create applications 
that build on libraries.  Also, what about development?  You certainly 
can't rely on a central build farm to create development builds for 
people as they work on the code.

For example, in the case of the VTK www.vtk.org toolkit, a small cmake 
file like this:

project(myVTK)
find_package(VTK REQUIRED)
include(${USE_VTK_FILE})
add_executable(myVTKProgram program.cxx)
target_link_libraries(myVTKProgram vtkRendering)

is all that is required for users of VTK to build their own cross 
platform application.  Before CMake (BC ?), we had a Makefile.in for 
unix, and a program called pcbuilder that read the Makefile.in and 
created an nmake file on windows.  It only worked with the core VTK 
libraries, and users were on their own.

-Bill



More information about the SLDev mailing list