Cmake-3.x compiled installation and man page additions in Linux

Source: Internet
Author: User

First review the compilation and installation of cmake-2.x.

================ cmake-2.x Compiling installation Instructions ================
To compile the installation command:

./bootstrap--prefix= installation directory (default is/usr/local)make makeinstall(depending on the installation directory, Root privileges may be required)

When you execute the script file bootstrap, add the parameter "--qt-gui" to compile the GUI version cmake program.

After compiling and installing, edit the file/etc/profile and add "install directory/bin" to the environment variable path.

The installed CMake comes with a man document, and you can use man to view CMake's use help without modifying/etc/man.config, as long as you add the "install directory/bin" to the environment variable path.


================ cmake-3.x Compiling installation Instructions ================
The installation steps are basically the same as cmake-2.x, and the main difference is how the help document is built.

Cmake-2.x's help document is actually embedded in the source code, and compiled into the executable file, through the "--help-full 、--help-html 、--Help-man" and other parameters output text format, HTML format, man format of the help document.

The cmake-3.x only retains the help document "--help-full" for the output text format, and the other two formats need to be Sphinx(a Python plugin) using the document Generation tool.

When executing the script file bootstrap, specify the help document to build with the following parameters:

--sphinx-man Building a man help document
--sphinx-html Building HTML Help documents
--SPHINX-QTHELP Building Qch Help documentation
--sphinx-build=/path/to/sphinx-build setting the path to the Sphinx-build program

You need to install Sphinx before you perform make. Call the python-supplied pip command (pip3 in Python3) for installation:

See: https://github.com/sphinx-doc/sphinx/README forSphinxthis is the Sphinx documentation generator, see http://www.sphinx-doc.org/.installingInstall from PyPI to use stable version:pip Install-  U Sphinx
Install from PyPI to use beta version:pipInstall-U--Pre SphinxInstall from newest dev version inch Stable branch:PipInstallGit+https://Github.com/sphinx-doc/[email protected]Install from newest dev version in Master Branch:PipInstallGit+https://Github.com/sphinx-doc/sphinx Install from cloned Source:PipInstall . Install from cloned source as editable:pipInstall-E.

During the installation, Pip needs to be networked to download and install a bunch of other Python plugins. In order to install cmake-3.x on computers that cannot be networked, it is recommended that you install Sphinx on a computer that has access to the Internet to build cmake-3.x and its help documentation. After you perform the make install, deploy the installed files to a computer that is not networked.

Finally, you will write the Help document path to the/etc/man_db.conf file.


CMake https://cmake.org/files/

Sphinx https://github.com/sphinx-doc/sphinx/

---------------------------------------------------------------------------------------------

Transferred from: http://blog.csdn.net/zhawk/article/details/74276175

Cmake-3.x compiled installation and man page additions in Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.