diff options
author | Xi Ruoyao <xry111@xry111.site> | 2022-10-08 21:10:27 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2022-10-09 20:23:00 +0800 |
commit | 17c3817502f24eec3f25969a895e8331d1e1499e (patch) | |
tree | a346793bf131c1539d9c87f3eb3daf60d922d684 | |
parent | d8888f749702288e715136ce8157a8db887029b5 (diff) |
rust: chapter08: add cmake
-rw-r--r-- | chapter05/cmake.xml | 3 | ||||
-rw-r--r-- | chapter08/chapter08.xml | 1 | ||||
-rw-r--r-- | chapter08/cmake.xml | 139 | ||||
-rw-r--r-- | packages.ent | 2 |
4 files changed, 144 insertions, 1 deletions
diff --git a/chapter05/cmake.xml b/chapter05/cmake.xml index 650a2ea5e..296cd47d9 100644 --- a/chapter05/cmake.xml +++ b/chapter05/cmake.xml @@ -78,7 +78,8 @@ <sect2 role="content"> <title/> - <para>Details on this package are located in TODO.</para> + <para>Details on this package are located in + <xref linkend="contents-cmake" role="."/></para> </sect2> </sect1> diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml index 902d1bf48..ec32010c6 100644 --- a/chapter08/chapter08.xml +++ b/chapter08/chapter08.xml @@ -59,6 +59,7 @@ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cmake.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/> diff --git a/chapter08/cmake.xml b/chapter08/cmake.xml new file mode 100644 index 000000000..d49fcc84b --- /dev/null +++ b/chapter08/cmake.xml @@ -0,0 +1,139 @@ +<?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; +]> + +<sect1 id="ch-system-cmake" role="wrap"> + <?dbhtml filename="cmake.html"?> + + <sect1info condition="script"> + <productname>cmake</productname> + <productnumber>&cmake-version;</productnumber> + <address>&cmake-url;</address> + </sect1info> + + <title>CMake-&cmake-version;</title> + + <indexterm zone="ch-system-cmake"> + <primary sortas="a-CMake">CMake</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The CMake package contains a modern toolset used for generating + Makefiles. It is a successor of the auto-generated configure script and + aims to be platform- and compiler-independent. A significant user of + CMake is LLVM.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&cmake-final-sbu;</seg> + <seg>&cmake-final-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of CMake</title> + + <para>Prevents applications using CMake from attempting to install files + into <filename class='directory'>lib64</filename>:</para> + +<screen><userinput remap="pre">sed -i '/"lib64"/s/64//' Modules/GNUInstallDirs.cmake</userinput></screen> + + <para>Prepare CMake for compilation:</para> + +<screen><userinput remap="configure">./bootstrap --prefix=/usr --no-system-libs</userinput></screen> + + <para>Compile CMake by running:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <sect2 role="content" id='contents-cmake'> + <title>Contents of CMake</title> + + <segmentedlist> + <segtitle>Installed Programs</segtitle> + <segtitle>Installed Directories</segtitle> + + <seglistitem> + <seg> + ccmake, cmake, cpack, and ctest + </seg> + <seg> + /usr/share/cmake-&cmake-majmin; and + /usr/share/doc/cmake-&cmake-version; + </seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="ccmake"> + <term><command>ccmake</command></term> + <listitem> + <para> + is a curses based interactive frontend to + <command>cmake</command> + </para> + <indexterm zone="ch-system-cmake"> + <primary sortas="b-ccmake">ccmake</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="cmake-prog"> + <term><command>cmake</command></term> + <listitem> + <para> + is the makefile generator + </para> + <indexterm zone="ch-system-cmake"> + <primary sortas="b-cmake">cmake</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="cpack"> + <term><command>cpack</command></term> + <listitem> + <para> + is the <application>CMake</application> packaging program + </para> + <indexterm zone="ch-system-cmake"> + <primary sortas="b-cpack">cpack</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="ctest"> + <term><command>ctest</command></term> + <listitem> + <para> + is a testing utility for cmake-generated build trees + </para> + <indexterm zone="ch-system-cmake"> + <primary sortas="b-ctest">ctest</primary> + </indexterm> + </listitem> + </varlistentry> + </variablelist> + + </sect2> +</sect1> diff --git a/packages.ent b/packages.ent index e6467f58c..853c230d3 100644 --- a/packages.ent +++ b/packages.ent @@ -112,6 +112,8 @@ <!ENTITY cmake-home "https://cmake.org/"> <!ENTITY cmake-tmp-sbu "3.0 SBU"> <!ENTITY cmake-tmp-du "443 MB"> +<!ENTITY cmake-final-sbu "3.0 SBU"> +<!ENTITY cmake-final-du "443 MB"> <!ENTITY coreutils-version "9.1"> <!ENTITY coreutils-size "5,570 KB"> |