CMake
From Wikipedia, the free encyclopedia
CMake | |
Developer: | Andy Cedilnik, Bill Hoffman, Brad King, Ken Martin |
---|---|
Latest release: | 2.4.5 / December 4, 2006 |
OS: | Windows, POSIX |
Use: | Software development tools |
License: | BSD License |
Website: | www.cmake.org |
CMake is an extensible, open-source system that manages the build process in an operating system and compiler independent manner. Unlike many cross-platform systems, CMake is designed to be used in conjunction with the native build environment. Simple configuration files placed in each source directory (called CMakeLists.txt files) are used to generate standard build files (e.g., makefiles on Unix and projects/workspaces in Windows Visual C++) which are used in the usual way. CMake can compile source code, create libraries, generate wrappers, and build executables in arbitrary combinations. CMake supports in-place and out-of-place builds, and can therefore support multiple builds from a single source tree. CMake also supports static and dynamic library builds.
Contents |
[edit] Major features
- Configuration files are CMake scripts, which means that user-written builds have access to a very simple and compact, build-oriented programming language,
- Automatic dependency analysis built-in for C, C++, Fortran and Java,
- Support of SWIG, Qt, FLTK via the CMake scripting langage,
- Built-in support for Microsoft Visual Studio .NET and past Visual Studio versions, including generation of .dsp, .dsw, .sln and .vcproj files,
- Detection of file content changes using traditional timestamps,
- Support for parallel builds,
- Full system inspection,
- Global view of all dependencies, using CMake to output a graphviz diagram,
- Designed from the ground up for cross-platform builds, and known to work on GNU/Linux, other POSIX systems (including AIX, *BSD systems, HP-UX, IRIX/SGI, MinGW/MSYS and Solaris), Mac OS X and Windows 95/98/NT/2000/XP,
- Integrated with Dart, CTest and CPack.
[edit] Sample CMakeLists.txt
ADD_EXECUTABLE(foo foo.c)
When the user runs the "cmake .
" command, cmake will build an executable named foo (or foo.exe on Windows).
[edit] History
CMake was created in response to the need for a powerful, cross-platform build environment for the Insight Segmentation and Registration Toolkit (ITK) funded by the United States National Library of Medicine as part of the Visible Human Project. It was influenced by an earlier system called pcmaker created by Ken Martin and other developers to support the Visualization Toolkit (VTK) open-source 3D graphics and visualization system. To create CMake, Bill Hoffman at Kitware incorporated some key ideas from pcmaker, and added many more of his own, with the thought to adopt some of the functionality of autotools. The initial CMake implementation was mid-2000, with accelerated development occurring in early 2001. Many improvements were due to the influences of other developers incorporating CMake into their own systems. For example, the VXL software community adopted CMake as their build environment, contributing many essential features. Brad King added several features in order to support the CABLE, and automated wrapping environment and GCC-XML, and GE Corporate R&D required support of their testing infrastructure (DART). Other features were added to support the transition of VTK's build environment to CMake, and to support ParaView, a parallel visualization system to support the Advanced Computing Lab at Los Alamos National Laboratory.
[edit] Notable users
- KDE (starting with version 4)