

First, standard build files are created (generated) from configuration files (CMakeLists.txt) which are written in CMake language. The build of a program or library with CMake is a two-stage process. Compilers ĬMake supports an extensive list of compilers, including: Apple Clang, Clang, GNU GCC, MSVC, Oracle Developer Studio, and Intel C++ Compiler. It can also produce build scripts for MSBuild or NMake on Windows Unix Make on Unix-like platforms such as Linux, macOS, and Cygwin and Ninja on both Windows and Unix-like platforms.ĬMake allows specification of features that the compiler is required to support in order to get the target program or library compiled.

IDE configuration support ĬMake can generate project files for several popular IDEs, such as Microsoft Visual Studio, Xcode, and Eclipse CDT. Its open-source, extensible design allows CMake to be adapted as necessary for specific projects. In addition, CMake can work with projects that require executables to be created before generating code to be compiled for the final application. For instance, CMake is able to accommodate a project that has multiple toolkits, or libraries that each have multiple directories. The cache can be edited with a graphical editor, which is shipped with CMake.Ĭomplicated directory hierarchies and applications that rely on several libraries are well supported by CMake. These locations are stored in a cache, which can then be tailored before generating the target build files. However, the users aren't protected in any way from removing the original source code folder.ĬMake can locate system-wide and user-specified executables, files, and libraries. Placing the compiler outputs outside of the source tree keeps the tree separate from the build files, ensuring that removing a build directory will not remove the source files. This enables multiple builds from the same source tree and cross-compilation. The commands add_compile_options, include_directories, link_directories, link_libraries that were at the core of CMake 2 should now be replaced by target-specific commands.Ī key feature is the ability to place compiler outputs (such as object files) outside of the source tree. Experts now advise to avoid variables in favor of targets and properties. It has been described as the beginning of "Modern CMake". Additional features were created when VTK transitioned to CMake for its build environment and for supporting ParaView. CMake was first implemented in 2000 and further developed in 2001.Ĭontinued development and improvements were fueled by the incorporation of CMake into developers’ own systems, including the VXL Project, the CABLE features added by Brad King, and GE Corporate R&D for support of DART.

At Kitware, Bill Hoffman blended components of pcmaker with his own ideas, striving to mimic the functionality of Unix configure scripts. It was partially inspired by pcmaker, which was made by Ken Martin and other developers to support the Visualization Toolkit (VTK). The project is funded by the United States National Library of Medicine as part of the Visible Human Project. CMake development began in 1999 in response to the need for a cross-platform build environment for the Insight Segmentation and Registration Toolkit.
