About.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html>
  3. <!--#include virtual="/CMake/HTML/Head.html"-->
  4. <body bgcolor="#FFFFFF" leftmargin=0 topmargin=0 text="black" link="#FFFFFF"
  5. vlink="#000000" alink="#000000">
  6. <!--#include virtual="/CMake/HTML/Table.html"-->
  7. <tr>
  8. <!--#include virtual="/CMake/HTML/SideBar.html"-->
  9. <td width="550" valign="top" bgcolor="#FFFFFF">
  10. <div align="left">
  11. <font size=5>CMake </font> is an extensible, open-source system that
  12. manages the build process in an operating system and compiler independent
  13. manner. Unlike many cross-platform systems, CMake is designed to be used
  14. in conjunction with the native build environment. Simple configuration
  15. files placed in each source directory (called CMakeLists.txt files) are
  16. used to generate standard build files (e.g., makefiles on Unix and
  17. projects/workspaces in Windows MSVC) which are used in the usual
  18. way. CMake can compile source code, create libraries, generate wrappers,
  19. and build executables in arbitrary combinations. CMake supports in-place
  20. and out-of-place builds, and can therefore support multiple builds from a
  21. single source tree. CMake also supports static and dynamic library
  22. builds. Another nice feature of CMake is that it generates a cache file
  23. that is designed to be used with a graphical editor. For example, when
  24. CMake runs, it locates include files, libraries, and executable, and may
  25. encounter optional build directives. This information is gathered into
  26. the cache, which may be changed by the user prior to the generation of
  27. the native build files. (The following figure is the CMake cache GUI in
  28. the Windows MSVC environment.)
  29. <div align="center">
  30. <img src="/CMake/Art/CMakeGUI.jpg" width=400 height=276
  31. border=0 alt="">
  32. </div>
  33. <P>
  34. CMake is designed to support complex directory hierarchies and
  35. applications dependent on several libraries. For example, CMake supports
  36. projects consisting of multiple toolkits (i.e., libraries), where each
  37. toolkit might contain several directories, and the application depends on
  38. the toolkits plus additional code. CMake can also handle situations where
  39. executables must be built in order to generate code that is then compiled
  40. and linked into a final application. Because CMake is open source, and has
  41. a simple, extensible design, CMake can be extended as necessary to support
  42. new features.
  43. <P>
  44. Using CMake is simple. The build process is controlled by creating one or
  45. more CMakeLists.txt files in each directory (including subdirectories)
  46. that make up a project. Each CMakeLists.txt consists of one or more
  47. commands. Each command has the form COMMAND (args...) where COMMAND is
  48. the name of the command, and args is a white-space separated list of
  49. arguments. CMake provides many pre-defined commands, but if you need to,
  50. you can add your own commands. In addition, the advanced user can add
  51. other makefile generators for a particular compiler/OS combination.
  52. (While Unix and MSVC++ is supported currently, other developers are
  53. adding other compiler/OS support.) You may wish to study the
  54. <a href="/CMake/HTML/Examples.html">examples</a> page to see more
  55. details.
  56. <h3>A Summary Of Features</h3>
  57. CMake has several powerful features. These include:
  58. <ul>
  59. <li>Supports complex, large build environments. CMake has been
  60. proven in several large projects.
  61. <li>Generates native build files (e.g., makefiles on Unix;
  62. workspaces/projects on MS Visual C++). Therefore standard
  63. tools can be used on any platform/compiler configuration.
  64. <li>Has powerful commands include the ability to locate
  65. include files, libraries, executables; include external
  66. CMake files that encapsulate standard functionality;
  67. interfaces to testing systems; supports recursive
  68. directory traversal with variable inheritance; can run
  69. external programs; supports conditional builds; supports
  70. regular expression expansion; and so on.
  71. <li>Supports in-place and out-of-place builds. Multiple
  72. compilation trees are possible from a single source tree.
  73. <li>Can be easily extended to add new features.
  74. <li>CMake is open source.
  75. <li>CMake operates with a cache designed to be interfaced with
  76. a graphical editor. The cache provides optional interaction
  77. to conditionally control the build process.
  78. </ul>
  79. <h3>The Origins of CMake</h3> CMake was created in response to the need
  80. for a powerful, cross-platform build environment for the Insight
  81. Segmentation and Registration Toolkit (ITK) funded by NLM as part of the
  82. Visible Human Project. It was influenced by an earlier system called
  83. <b>pcmaker</b> created by Ken Martin and other developers to support the
  84. <a href="http://public.kitware.com/vtk.html">Visualization Toolkit
  85. (VTK)</a> open source 3D graphics and visualization system. To create
  86. CMake, Bill Hoffman at Kitware incorporated some key ideas from pcmaker,
  87. and added many more of his own, with the thought to adopt some of the
  88. functionality of the Unix
  89. <b>configure</b> tool. The initial CMake implementation was mid-2000,
  90. with acclerated development occuring in early 2001. Many improvements
  91. were due to the influences of other developers incorporating CMake into
  92. their own systems. For example, the
  93. <a href="http://www.robots.ox.ac.uk/~vxl/">VXL</a> software community
  94. adopted CMake as their build environment, contributing many essential
  95. features. Brad King added several features in order to support the CABLE
  96. automated wrapping environment and
  97. <a href="http://public.kitware.com/GCC_XML">GCC-XML</a>, and
  98. GE Corporate R&D required support of their testing infrastructure
  99. (the <a href="http://public.kitware.com/Insight/Testing/HTML/TestingResults/Dashboard/MostRecentResults-Nightly/Dashboard.html">quality dashboard</a>).
  100. Other features were added to support the transition of VTK's
  101. build environment to CMake, and to support ParaView, a parallel
  102. visualization system to support the
  103. <a href="http://www.acl.lanl.gov/">Advanced Computing Lab</a> at Los Alamos
  104. National Laboratory.
  105. <h3>How Do I Learn CMake?</h3> CMake is a young and rapidly growing
  106. system. It has already seen extensive use in very large software systems
  107. such as VTK, VXL, and ITK, and is therefore, quite
  108. stable. Unfortuneately, the pace of development has outstripped the pace
  109. of documentation. As a result, the best way to learn about CMake is to
  110. study existing CMake installations, and to rely on the CMake mailing
  111. list. There is some existing documentation, but until later in 2001 the
  112. documentation should be treated with caution. Please go to the
  113. <a href="/CMake/HTML/Documentation.html">documentation</a> for more
  114. information. Also, see the <a href="/CMake/HTML/Examples.html">example</a>
  115. found here.
  116. </div>
  117. </td>
  118. </tr>
  119. </table>
  120. </td>
  121. </tr>
  122. </table>
  123. </body>
  124. </html>