Imported Upstream version 3.14.1
[platform/upstream/cmake.git] / README.rst
1 CMake
2 *****
3
4 Introduction
5 ============
6
7 CMake is a cross-platform, open-source build system generator.
8 For full documentation visit the `CMake Home Page`_ and the
9 `CMake Documentation Page`_. The `CMake Community Wiki`_ also
10 references useful guides and recipes.
11
12 .. _`CMake Home Page`: https://cmake.org
13 .. _`CMake Documentation Page`: https://cmake.org/cmake/help/documentation.html
14 .. _`CMake Community Wiki`: https://gitlab.kitware.com/cmake/community/wikis/home
15
16 CMake is maintained and supported by `Kitware`_ and developed in
17 collaboration with a productive community of contributors.
18
19 .. _`Kitware`: http://www.kitware.com/cmake
20
21 License
22 =======
23
24 CMake is distributed under the OSI-approved BSD 3-clause License.
25 See `Copyright.txt`_ for details.
26
27 .. _`Copyright.txt`: Copyright.txt
28
29 Building CMake
30 ==============
31
32 Supported Platforms
33 -------------------
34
35 * Microsoft Windows
36 * Apple macOS
37 * Linux
38 * FreeBSD
39 * OpenBSD
40 * Solaris
41 * AIX
42
43 Other UNIX-like operating systems may work too out of the box, if not
44 it should not be a major problem to port CMake to this platform.
45 Subscribe and post to the `CMake Users List`_ to ask if others have
46 had experience with the platform.
47
48 .. _`CMake Users List`: https://cmake.org/mailman/listinfo/cmake
49
50 Building CMake from Scratch
51 ---------------------------
52
53 UNIX/Mac OSX/MinGW/MSYS/Cygwin
54 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
55
56 You need to have a C++ compiler (supporting C++11) and a ``make`` installed.
57 Run the ``bootstrap`` script you find in the source directory of CMake.
58 You can use the ``--help`` option to see the supported options.
59 You may use the ``--prefix=<install_prefix>`` option to specify a custom
60 installation directory for CMake. You can run the ``bootstrap`` script from
61 within the CMake source directory or any other build directory of your
62 choice. Once this has finished successfully, run ``make`` and
63 ``make install``.  In summary::
64
65  $ ./bootstrap && make && sudo make install
66
67 Windows
68 ^^^^^^^
69
70 You need to download and install a binary release of CMake in order to build
71 CMake.  You can get these releases from the `CMake Download Page`_.  Then
72 proceed with the instructions below.
73
74 .. _`CMake Download Page`: https://cmake.org/cmake/resources/software.html
75
76 Building CMake with CMake
77 -------------------------
78
79 You can build CMake as any other project with a CMake-based build system:
80 run the installed CMake on the sources of this CMake with your preferred
81 options and generators. Then build it and install it.
82 For instructions how to do this, see documentation on `Running CMake`_.
83
84 .. _`Running CMake`: https://cmake.org/cmake/help/runningcmake.html
85
86 To build the documentation, install `Sphinx`_ and configure CMake with
87 ``-DSPHINX_HTML=ON`` and/or ``-DSPHINX_MAN=ON`` to enable the "html" or
88 "man" builder.  Add ``-DSPHINX_EXECUTABLE=/path/to/sphinx-build`` if the
89 tool is not found automatically.
90
91 .. _`Sphinx`: http://sphinx-doc.org
92
93 Reporting Bugs
94 ==============
95
96 If you have found a bug:
97
98 1. If you have a patch, please read the `CONTRIBUTING.rst`_ document.
99
100 2. Otherwise, please join the `CMake Users List`_ and ask about
101    the expected and observed behaviors to determine if it is really
102    a bug.
103
104 3. Finally, if the issue is not resolved by the above steps, open
105    an entry in the `CMake Issue Tracker`_.
106
107 .. _`CMake Issue Tracker`: https://gitlab.kitware.com/cmake/cmake/issues
108
109 Contributing
110 ============
111
112 See `CONTRIBUTING.rst`_ for instructions to contribute.
113
114 .. _`CONTRIBUTING.rst`: CONTRIBUTING.rst