2011-01-20 04:28:52 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
|
2017-08-16 02:49:48 +08:00
|
|
|
<!ENTITY cmake-download-http "https://cmake.org/files/v&cmake-major-version;/cmake-&cmake-version;.tar.gz">
|
2011-01-20 04:28:52 +08:00
|
|
|
<!ENTITY cmake-download-ftp " ">
|
2023-08-14 03:03:23 +08:00
|
|
|
<!ENTITY cmake-md5sum "07786cd23c3d0aa9c2fef69efb13662b">
|
2022-11-18 20:50:06 +08:00
|
|
|
<!ENTITY cmake-size "10 MB">
|
2023-07-21 02:49:40 +08:00
|
|
|
<!ENTITY cmake-buildsize "424 MB (add 1.2 GB for tests)">
|
|
|
|
<!ENTITY cmake-time "2.0 SBU (add 3.2 SBU for tests, both using parallelism=4)">
|
2011-01-20 04:28:52 +08:00
|
|
|
]>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<sect1 id="cmake" xreflabel="CMake-&cmake-version;">
|
2011-01-20 04:28:52 +08:00
|
|
|
<?dbhtml filename="cmake.html"?>
|
|
|
|
|
|
|
|
|
|
|
|
<title>CMake-&cmake-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="cmake">
|
|
|
|
<primary sortas="a-CMake">CMake</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to CMake</title>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2013-02-12 02:51:17 +08:00
|
|
|
The <application>CMake</application> package contains a modern
|
|
|
|
toolset used for generating Makefiles. It is a successor of the
|
2013-01-20 01:34:41 +08:00
|
|
|
auto-generated <command>configure</command> script and aims to
|
2013-02-12 02:51:17 +08:00
|
|
|
be platform- and compiler-independent. A significant user of
|
2013-01-20 01:34:41 +08:00
|
|
|
<application>CMake</application> is <application>KDE</application>
|
|
|
|
since version 4.
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
2023-08-16 06:21:31 +08:00
|
|
|
&lfs120_checked;
|
2011-01-20 04:28:52 +08:00
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Download (HTTP): <ulink url="&cmake-download-http;"/>
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Download (FTP): <ulink url="&cmake-download-ftp;"/>
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Download MD5 sum: &cmake-md5sum;
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Download size: &cmake-size;
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Estimated disk space required: &cmake-buildsize;
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Estimated build time: &cmake-time;
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
2022-09-22 09:16:48 +08:00
|
|
|
<!--
|
2020-07-19 05:37:11 +08:00
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Required patch:
|
2022-08-23 00:33:42 +08:00
|
|
|
<ulink url="&patch-root;/cmake-&cmake-version;-upstream_fix-1.patch"/>
|
2020-07-19 05:37:11 +08:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
2022-09-22 09:16:48 +08:00
|
|
|
-->
|
2020-07-19 05:37:11 +08:00
|
|
|
|
2011-01-20 04:28:52 +08:00
|
|
|
<bridgehead renderas="sect3">CMake Dependencies</bridgehead>
|
|
|
|
|
2013-08-15 21:47:13 +08:00
|
|
|
<bridgehead renderas="sect4">Recommended</bridgehead>
|
|
|
|
<para role="recommended">
|
2020-07-19 05:37:11 +08:00
|
|
|
<xref linkend="curl"/>,
|
2022-10-06 19:50:55 +08:00
|
|
|
<xref linkend="libarchive"/>,
|
|
|
|
<xref linkend="libuv"/>, and
|
2020-07-19 05:37:11 +08:00
|
|
|
<xref linkend="nghttp2"/>
|
2011-11-01 03:38:44 +08:00
|
|
|
</para>
|
|
|
|
|
2012-04-09 20:50:25 +08:00
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
2011-11-01 03:38:44 +08:00
|
|
|
<para role="optional">
|
2021-02-18 14:05:44 +08:00
|
|
|
<xref linkend="gcc"/> (for gfortran),
|
2020-08-02 00:29:16 +08:00
|
|
|
<xref linkend="git"/> (for use during tests),
|
2020-12-18 06:38:29 +08:00
|
|
|
<xref linkend="mercurial"/> (for use during tests),
|
2023-07-14 09:23:08 +08:00
|
|
|
&qt5-deps; (for the Qt-based GUI),
|
2023-01-19 00:02:55 +08:00
|
|
|
<xref linkend="sphinx"/> (for building documents),
|
2023-07-27 02:02:35 +08:00
|
|
|
<xref linkend="subversion"/> (for testing),
|
|
|
|
<ulink url="https://github.com/google/cppdap/">cppdap</ulink>,
|
|
|
|
<ulink url="https://github.com/open-source-parsers/jsoncpp/">jsoncpp</ulink>, and
|
2023-01-29 12:31:35 +08:00
|
|
|
<ulink url="https://rhash.sourceforge.net/">rhash</ulink>
|
2011-01-20 04:28:52 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of CMake</title>
|
2017-04-15 09:13:42 +08:00
|
|
|
|
2022-09-22 09:16:48 +08:00
|
|
|
<!--
|
2020-07-19 05:37:11 +08:00
|
|
|
<para>
|
2022-08-23 00:33:42 +08:00
|
|
|
First, adapt the FindBoost module to use Boost-1.80.0:
|
2020-07-19 05:37:11 +08:00
|
|
|
</para>
|
|
|
|
|
2022-08-23 00:33:42 +08:00
|
|
|
<screen><userinput remap="pre">patch -Np1 -i ../cmake-&cmake-version;-upstream_fix-1.patch</userinput></screen>
|
2022-09-22 09:16:48 +08:00
|
|
|
-->
|
2020-07-19 05:37:11 +08:00
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Install <application>CMake</application> by running the following
|
|
|
|
commands:
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
2017-11-28 11:17:06 +08:00
|
|
|
<screen><userinput>sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake &&
|
2016-11-17 03:58:24 +08:00
|
|
|
|
2017-04-15 09:13:42 +08:00
|
|
|
./bootstrap --prefix=/usr \
|
|
|
|
--system-libs \
|
|
|
|
--mandir=/share/man \
|
|
|
|
--no-system-jsoncpp \
|
2023-07-21 02:49:40 +08:00
|
|
|
--no-system-cppdap \
|
2017-04-15 09:13:42 +08:00
|
|
|
--no-system-librhash \
|
2015-02-07 23:18:18 +08:00
|
|
|
--docdir=/share/doc/cmake-&cmake-version; &&
|
2011-01-20 04:28:52 +08:00
|
|
|
make</userinput></screen>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2021-01-17 01:55:52 +08:00
|
|
|
To test the results, issue: <command>LC_ALL=en_US.UTF-8 bin/ctest
|
2015-11-18 13:29:40 +08:00
|
|
|
-j<replaceable><N></replaceable> -O
|
|
|
|
cmake-&cmake-version;-test.log</command>, where
|
2015-02-07 23:18:18 +08:00
|
|
|
<replaceable><N></replaceable> is an integer between 1 and the
|
2021-01-17 01:55:52 +08:00
|
|
|
number of system cores. Setting <envar>LC_ALL</envar> is needed to
|
|
|
|
prevent some test failures when some of the locale variables are
|
2023-07-21 02:49:40 +08:00
|
|
|
set to non English locales.
|
|
|
|
<!--
|
|
|
|
One test, RunCMake.FindBoost, is known to fail.
|
|
|
|
Now cmake-3.27.0. All tests pass.
|
|
|
|
-->
|
2021-07-19 09:20:43 +08:00
|
|
|
</para>
|
2015-11-19 06:27:48 +08:00
|
|
|
|
2021-09-07 01:42:49 +08:00
|
|
|
<para>
|
2021-07-19 09:20:43 +08:00
|
|
|
If you want to investigate a problem with a given "problem1-test",
|
2014-09-24 06:52:35 +08:00
|
|
|
use <command>bin/ctest -R "problem1-test"</command> and, to omit it, use
|
2014-06-11 08:03:28 +08:00
|
|
|
<command>bin/ctest -E "problem1-test"</command>. These options can be
|
2021-11-14 17:50:16 +08:00
|
|
|
used together:
|
|
|
|
<command>bin/ctest -R "problem1-test" -E "problem2-test"</command>.
|
|
|
|
Option <option>-N</option> can be used to display all
|
2014-09-24 06:52:35 +08:00
|
|
|
available tests, and you can run <command>bin/ctest</command> for a
|
|
|
|
sub-set of tests by using separated by spaces names or numbers as
|
2021-11-14 17:50:16 +08:00
|
|
|
options. Option <option>--help</option> can be used to show all options.
|
2013-01-20 01:34:41 +08:00
|
|
|
</para>
|
2011-11-01 03:38:44 +08:00
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
|
|
|
<screen role="root"><userinput>make install</userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2016-12-20 05:36:08 +08:00
|
|
|
<para>
|
2021-09-07 01:42:49 +08:00
|
|
|
<command>sed ... Modules/GNUInstallDirs.cmake</command>:
|
|
|
|
This command disables applications using cmake from attempting to
|
2017-01-16 01:34:58 +08:00
|
|
|
install files in /usr/lib64/.
|
2016-12-20 05:36:08 +08:00
|
|
|
</para>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2013-10-11 18:43:06 +08:00
|
|
|
<parameter>--system-libs</parameter>: This switch forces the build system
|
|
|
|
to link against <application>Zlib</application>,
|
|
|
|
<application>Bzip2</application>, <application>cURL</application>,
|
2020-08-17 04:08:51 +08:00
|
|
|
<application>nghttp2</application>,
|
2013-10-11 18:43:06 +08:00
|
|
|
<application>Expat</application> and <application>libarchive</application>
|
|
|
|
installed on the system.
|
2013-01-20 01:34:41 +08:00
|
|
|
</para>
|
2013-02-12 02:51:17 +08:00
|
|
|
|
2015-03-14 16:47:03 +08:00
|
|
|
<para>
|
2023-07-21 02:49:40 +08:00
|
|
|
<parameter>--no-system-jsoncpp</parameter> and
|
|
|
|
<parameter>--no-system-cppdap</parameter>: These switches remove the
|
2015-03-14 16:47:03 +08:00
|
|
|
<application>JSON-C++</application> library from the list of system
|
|
|
|
libraries. A bundled version of that library is used instead.
|
2020-09-03 11:55:56 +08:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<parameter>--no-system-librhash</parameter>: This switch removes the
|
|
|
|
<application>librhash</application> library from the list of system
|
|
|
|
libraries used. A bundled version of that library is used instead.
|
2015-03-14 16:47:03 +08:00
|
|
|
</para>
|
|
|
|
|
2022-10-06 19:50:55 +08:00
|
|
|
<para>
|
|
|
|
<option>--no-system-{curl,libarchive,libuv,nghttp2}</option>: Use
|
|
|
|
the corresponding option in the list for the
|
2023-08-16 05:55:17 +08:00
|
|
|
<command>bootstrap</command> if one of the recommended dependencies is
|
|
|
|
not installed. A bundled version of the dependency will be used instead.
|
2022-10-06 19:50:55 +08:00
|
|
|
</para>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2020-11-20 07:42:10 +08:00
|
|
|
<option>--qt-gui</option>: This switch enables building the
|
2013-01-20 01:34:41 +08:00
|
|
|
<application>Qt</application>-based GUI for
|
|
|
|
<application>CMake</application>.
|
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
2020-07-19 05:37:11 +08:00
|
|
|
<para>
|
2021-09-07 01:42:49 +08:00
|
|
|
<option>--parallel=</option>: This switch enables performing the
|
2020-07-19 05:37:11 +08:00
|
|
|
<application>CMake</application> bootstrap with multiple jobs
|
|
|
|
at one time.
|
|
|
|
</para>
|
|
|
|
|
2011-01-20 04:28:52 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
2011-01-21 22:12:30 +08:00
|
|
|
<segtitle>Installed Programs</segtitle>
|
2013-01-26 00:32:25 +08:00
|
|
|
<segtitle>Installed Libraries</segtitle>
|
2011-01-21 22:12:30 +08:00
|
|
|
<segtitle>Installed Directories</segtitle>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
|
|
|
<seglistitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<seg>
|
2017-11-09 18:48:19 +08:00
|
|
|
ccmake, cmake, cmake-gui (optional), cpack, and ctest
|
2013-01-20 01:34:41 +08:00
|
|
|
</seg>
|
2013-01-26 00:32:25 +08:00
|
|
|
<seg>
|
|
|
|
None
|
|
|
|
</seg>
|
2013-01-20 01:34:41 +08:00
|
|
|
<seg>
|
|
|
|
/usr/share/cmake-&cmake-major-version; and
|
|
|
|
/usr/share/doc/cmake-&cmake-version;
|
|
|
|
</seg>
|
2011-01-20 04:28:52 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
2013-02-12 02:51:17 +08:00
|
|
|
|
2011-01-20 04:28:52 +08:00
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="ccmake">
|
|
|
|
<term><command>ccmake</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
|
|
|
is a curses based interactive frontend to
|
2021-02-19 23:20:16 +08:00
|
|
|
<command>cmake</command>
|
2013-01-20 01:34:41 +08:00
|
|
|
</para>
|
2011-01-20 04:28:52 +08:00
|
|
|
<indexterm zone="cmake ccmake">
|
|
|
|
<primary sortas="b-ccmake">ccmake</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2013-01-20 01:34:41 +08:00
|
|
|
<varlistentry id="cmake-prog">
|
2011-01-20 04:28:52 +08:00
|
|
|
<term><command>cmake</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2021-02-19 23:20:16 +08:00
|
|
|
is the makefile generator
|
2013-01-20 01:34:41 +08:00
|
|
|
</para>
|
|
|
|
<indexterm zone="cmake cmake-prog">
|
2011-01-20 04:28:52 +08:00
|
|
|
<primary sortas="b-cmake">cmake</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2013-02-12 02:51:17 +08:00
|
|
|
|
2012-04-09 20:50:25 +08:00
|
|
|
<varlistentry id="cmake-gui">
|
|
|
|
<term><command>cmake-gui</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2020-11-20 07:42:10 +08:00
|
|
|
(optional) is the <application>Qt</application>-based frontend to
|
2021-02-19 23:20:16 +08:00
|
|
|
<command>cmake</command>
|
2013-01-20 01:34:41 +08:00
|
|
|
</para>
|
2012-04-09 20:50:25 +08:00
|
|
|
<indexterm zone="cmake cmake-gui">
|
|
|
|
<primary sortas="b-cmake-gui">cmake-gui</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="cpack">
|
|
|
|
<term><command>cpack</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2021-02-19 23:20:16 +08:00
|
|
|
is the <application>CMake</application> packaging program
|
2013-01-20 01:34:41 +08:00
|
|
|
</para>
|
2012-04-09 20:50:25 +08:00
|
|
|
<indexterm zone="cmake cpack">
|
|
|
|
<primary sortas="b-cpack">cpack</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
2013-02-12 02:51:17 +08:00
|
|
|
</varlistentry>
|
|
|
|
|
2012-04-09 20:50:25 +08:00
|
|
|
<varlistentry id="ctest">
|
|
|
|
<term><command>ctest</command></term>
|
|
|
|
<listitem>
|
2013-01-20 01:34:41 +08:00
|
|
|
<para>
|
2021-02-19 23:20:16 +08:00
|
|
|
is a testing utility for cmake-generated build trees
|
2013-01-20 01:34:41 +08:00
|
|
|
</para>
|
2012-04-09 20:50:25 +08:00
|
|
|
<indexterm zone="cmake ctest">
|
|
|
|
<primary sortas="b-ctest">ctest</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2011-01-20 04:28:52 +08:00
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
</sect1>
|