Check out my first novel, midnight's simulacra!

CMake: Difference between revisions

From dankwiki
(Created page with "[https://gitlab.kitware.com/cmake/cmake CMake] is one of the numerous build systems that seeks to replace Autotools+Make in the twenty-first century.")
 
No edit summary
Line 1: Line 1:
[https://gitlab.kitware.com/cmake/cmake CMake] is one of the numerous build systems that seeks to replace [[Autotools]]+[[Make]] in the twenty-first century.
[https://gitlab.kitware.com/cmake/cmake CMake] is one of the numerous build systems that seeks to replace [[Autotools]]+[[Make]] in the twenty-first century.
A CMake build can be configured on the command line with <tt>-D</tt> switches, or using <tt>ccmake</tt>/<tt>cmake-gui</tt>. Either way, the result is build infrastructure for some other tool, such as [[Make]] or [[Ninja]].
==Build Types==
<tt>CMAKE_BUILD_TYPE</tt> can take any of the values in <tt>CMAKE_CONFIGURATION_TYPES</tt>. Important ones include:
* Debug -- no optimization, full debug info, <tt>assert</tt> (<tt>NDEBUG</tt> is not defined)
* RelWithDebInfo -- optimized, symbols
* Release -- optimized, no symbols
* MinSizeRel -- optimized for size

Revision as of 03:19, 6 May 2020

CMake is one of the numerous build systems that seeks to replace Autotools+Make in the twenty-first century.

A CMake build can be configured on the command line with -D switches, or using ccmake/cmake-gui. Either way, the result is build infrastructure for some other tool, such as Make or Ninja.

Build Types

CMAKE_BUILD_TYPE can take any of the values in CMAKE_CONFIGURATION_TYPES. Important ones include:

  • Debug -- no optimization, full debug info, assert (NDEBUG is not defined)
  • RelWithDebInfo -- optimized, symbols
  • Release -- optimized, no symbols
  • MinSizeRel -- optimized for size