Happy Birthday CMake!
The CMake project officially launched on this day in 2000 on the Insight Segmentation and Registration Toolkit (ITK) mailing list:
http://public.kitware.com/pipermail/insight-developers/2000-August/024248.html
A small, five-person company, called Kitware (here is our 2000 web page), was taking part in a project funded by the National Library of Medicine to create a cross-platform C++ toolkit that would codify the state-of-the-art in segmentation and registration algorithms and complement the data in the Visible Human project. One of Kitware’s tasks was to create a build system that would work on Unix, Windows, and Mac OS. Kitware’s founding project, VTK, had a build system called pcmaker, which used autotools on Unix and a C++ program that created nmake makefiles on Windows. CMake was created with the limitations of that tool in mind.
One of the main objectives of CMake was to not add external dependencies to the project. Since CMake was used to build C++, the only thing on which we could depend would be a valid C++ compiler. That is why CMake is written entirely in C/C++, so that it can be built on any system on which you need to build your C++ project. This avoids what I like to call the Easter egg hunt build process. First find/build/install these five things and then you are ready to build the project you actually want to use.
Although we were tasked with creating a build system for ITK, to really be effective, I knew that CMake would have to be much more general purpose. When I first announced the CMake concept to the ITK development team at the auditorium at Lister Hall at NLM, someone asked me why I was creating the “ITK build system”. I sort of gave him a long stare, and before he waited for me to answer, he answered his own question: “I get it, you don’t want to build just ITK, you want to build ALL C++ in the world!” Yes, I admitted, World Domination was the goal.
Early CMake was far from perfect. Here is one of the very first CMake files:
CMakeLists.txt SUBDIRS = \ Code/Common \ Code/Insight3DParty/vxl \ Testing/Code/Common \ Testing/Code/Insight3DParty/vxl/vnl/tests ME = ITK Code/Common/CMakeLists.txt ME = ITKCommon COMPILE_CLASSES =\ itkDataObject \ itkDirectory \ itkDynamicLoader \ itkExceptionObject \ itkImageBase \ itkIndent \ itkLightObject \ itkNumericTraits \ itkObject \ itkObjectFactoryBase \ itkOutputWindow \ itkProcessObject \ itkTimeStamp \ itkVersion \ itkWriter WIN32_CLASSES =\ itkWin32OutputWindow
Interestingly enough, it was a declarative language back then. CMake has evolved over the past 15 years. One of the biggest milestones was the KDE adoption of CMake in 2006. This adoption was good for both projects. CMake had to follow standards of library naming and installation rules and many other improvements to be able to build and install KDE on the major Linux distributions. In addition, many valuable contributions to CMake have come from KDE developers.
CMake is close to, if not already, a de facto standard for building cross-platform C++ code. Thanks to all who have helped grow this project and those who will help in the future.
I would like to give a special thanks to the following people:
Brad King – Without Brad, CMake would undoubtedly be a horrible hack.
Alex Neundorf – Alex led the way for KDE to adopt CMake.
Stephen Kelly – Stephen has moved CMake forward in many ways and has contributed countless hours to the project.
Here is to the next 15 years!
-Bill