Commit cb811d11 authored by Bartosz Kosiorek's avatar Bartosz Kosiorek
Browse files

Help: Improve description of modules

parent 4ff7706f
......@@ -20,7 +20,7 @@ preprocessor definitions.
* Use :command:`include_directories` to add include directories.
* Use :command:`add_compile_options` to add other options.
Flags beginning in -D or /D that look like preprocessor definitions are
Flags beginning in ``-D`` or ``/D`` that look like preprocessor definitions are
automatically added to the :prop_dir:`COMPILE_DEFINITIONS` directory
property for the current directory. Definitions with non-trivial values
may be left in the set of flags instead of being converted for reasons of
......
......@@ -80,7 +80,7 @@ CMake Policy Stack
^^^^^^^^^^^^^^^^^^
CMake keeps policy settings on a stack, so changes made by the
cmake_policy command affect only the top of the stack. A new entry on
``cmake_policy`` command affect only the top of the stack. A new entry on
the policy stack is managed automatically for each subdirectory to
protect its parents and siblings. CMake also manages a new entry for
scripts loaded by :command:`include` and :command:`find_package` commands
......
......@@ -17,7 +17,7 @@ named ``[projectname]``. This can be used in the :command:`add_dependencies`
command to make things depend on the external project.
``TYPE``, ``GUID`` and ``PLATFORM`` are optional parameters that allow one to
specify the type of project, id (GUID) of the project and the name of
specify the type of project, id (``GUID``) of the project and the name of
the target platform. This is useful for projects requiring values
other than the default (e.g. WIX projects).
......
......@@ -25,7 +25,7 @@ The optional ``<mode>`` keyword determines the type of message:
The CMake command-line tool displays STATUS messages on stdout and all
other message types on stderr. The CMake GUI displays all messages in
its log area. The interactive dialogs (ccmake and CMakeSetup) show
STATUS messages one at a time on a status line and other messages in
``STATUS`` messages one at a time on a status line and other messages in
interactive pop-up boxes.
CMake Warning and Error message text displays using a simple markup
......
......@@ -35,7 +35,7 @@ It must be one of the following:
``SOURCE``
Scope may name zero or more source files. Note that source
file properties are visible only to targets added in the same
directory (CMakeLists.txt).
directory (``CMakeLists.txt``).
See also the :command:`set_source_files_properties` command.
``INSTALL``
......@@ -48,7 +48,7 @@ It must be one of the following:
Path components have to be separated by forward slashes,
must be normalized and are case sensitive.
To reference the installation prefix itself with a relative path use ".".
To reference the installation prefix itself with a relative path use ``.``.
Currently installed file properties are only defined for
the WIX generator where the given paths are relative
......
......@@ -16,4 +16,4 @@ See also the :command:`set_property(SOURCE)` command.
See :ref:`Source File Properties` for the list of properties known
to CMake. Source file properties are visible only to targets added
in the same directory (CMakeLists.txt).
in the same directory (``CMakeLists.txt``).
......@@ -16,7 +16,7 @@ build with the MinGW tools. It will also create imported targets for
the libraries created. This will only work if the fortran code is
built into a dll, so :variable:`BUILD_SHARED_LIBS` is turned on in
the project. In addition the :variable:`CMAKE_GNUtoMS` option is set
to on, so that Microsoft .lib files are created. Usage is as follows:
to on, so that Microsoft ``.lib`` files are created. Usage is as follows:
::
......@@ -32,15 +32,15 @@ to on, so that Microsoft .lib files are created. Usage is as follows:
NO_EXTERNAL_INSTALL # skip installation of external project
)
Relative paths in ARCHIVE_DIR and RUNTIME_DIR are interpreted with
Relative paths in ``ARCHIVE_DIR`` and ``RUNTIME_DIR`` are interpreted with
respect to the build directory corresponding to the source directory
in which the function is invoked.
Limitations:
NO_EXTERNAL_INSTALL is required for forward compatibility with a
``NO_EXTERNAL_INSTALL`` is required for forward compatibility with a
future version that supports installation of the external project
binaries during "make install".
binaries during ``make install``.
#]=======================================================================]
set(_MS_MINGW_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
......
This file provides a few notes to CMake developers about how to add
support for a new language to CMake. It is also possible to place
these files in CMAKE_MODULE_PATH within an outside project to add
languages not supported by upstream CMake. However, this is not
these files in :variable:`CMAKE_MODULE_PATH` within an outside project
to add languages not supported by upstream CMake. However, this is not
a fully supported use case.
The implementation behind the scenes of project/enable_language,
......@@ -29,5 +29,3 @@ CMake(LANG)Information.cmake -> set up rule variables for LANG :
CMAKE_(LANG)_CREATE_STATIC_LIBRARY
CMAKE_(LANG)_COMPILE_OBJECT
CMAKE_(LANG)_LINK_EXECUTABLE
......@@ -25,38 +25,41 @@ toolchain file instead.
-------------------------------------------------------------------------
Macro CMAKE_FORCE_C_COMPILER has the following signature:
Macro ``CMAKE_FORCE_C_COMPILER`` has the following signature:
::
CMAKE_FORCE_C_COMPILER(<compiler> <compiler-id>)
It sets CMAKE_C_COMPILER to the given compiler and the cmake internal
variable CMAKE_C_COMPILER_ID to the given compiler-id. It also
bypasses the check for working compiler and basic compiler information
tests.
It sets :variable:`CMAKE_C_COMPILER <CMAKE_<LANG>_COMPILER>` to
the given compiler and the cmake internal variable
:variable:`CMAKE_C_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` to the given
compiler-id. It also bypasses the check for working compiler and basic
compiler information tests.
Macro CMAKE_FORCE_CXX_COMPILER has the following signature:
Macro ``CMAKE_FORCE_CXX_COMPILER`` has the following signature:
::
CMAKE_FORCE_CXX_COMPILER(<compiler> <compiler-id>)
It sets CMAKE_CXX_COMPILER to the given compiler and the cmake
internal variable CMAKE_CXX_COMPILER_ID to the given compiler-id. It
also bypasses the check for working compiler and basic compiler
information tests.
It sets :variable:`CMAKE_CXX_COMPILER <CMAKE_<LANG>_COMPILER>` to
the given compiler and the cmake internal variable
:variable:`CMAKE_CXX_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` to the given
compiler-id. It also bypasses the check for working compiler and basic
compiler information tests.
Macro CMAKE_FORCE_Fortran_COMPILER has the following signature:
Macro ``CMAKE_FORCE_Fortran_COMPILER`` has the following signature:
::
CMAKE_FORCE_Fortran_COMPILER(<compiler> <compiler-id>)
It sets CMAKE_Fortran_COMPILER to the given compiler and the cmake
internal variable CMAKE_Fortran_COMPILER_ID to the given compiler-id.
It also bypasses the check for working compiler and basic compiler
information tests.
It sets :variable:`CMAKE_Fortran_COMPILER <CMAKE_<LANG>_COMPILER>` to
the given compiler and the cmake internal variable
:variable:`CMAKE_Fortran_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` to the given
compiler-id. It also bypasses the check for working compiler and basic
compiler information tests.
So a simple toolchain file could look like this:
......
......@@ -13,11 +13,11 @@ Usage:
check_language(<lang>)
where <lang> is a language that may be passed to enable_language()
such as "Fortran". If CMAKE_<lang>_COMPILER is already defined the
check does nothing. Otherwise it tries enabling the language in a
test project. The result is cached in CMAKE_<lang>_COMPILER as the
compiler that was found, or NOTFOUND if the language cannot be
where ``<lang>`` is a language that may be passed to :command:`enable_language`
such as ``Fortran``. If :variable:`CMAKE_<LANG>_COMPILER` is already defined
the check does nothing. Otherwise it tries enabling the language in a
test project. The result is cached in :variable:`CMAKE_<LANG>_COMPILER`
as the compiler that was found, or ``NOTFOUND`` if the language cannot be
enabled.
Example:
......
......@@ -5,8 +5,8 @@
CheckPIESupported
-----------------
Check whether the linker supports position independent code (PIE) or no
position independent code (NO_PIE) for executables.
Check whether the linker supports Position Independent Code (PIE) or No
Position Independent Code (NO_PIE) for executables.
Use this to ensure that the :prop_tgt:`POSITION_INDEPENDENT_CODE` target
property for executables will be honored at link time.
......
......@@ -5,9 +5,9 @@
FindALSA
--------
Find alsa
Find Advanced Linux Sound Architecture (ALSA)
Find the alsa libraries (asound)
Find the alsa libraries (``asound``)
IMPORTED Targets
^^^^^^^^^^^^^^^^
......
......@@ -7,7 +7,7 @@ FindAVIFile
Locate AVIFILE library and include paths
AVIFILE (http://avifile.sourceforge.net/)is a set of libraries for
AVIFILE (http://avifile.sourceforge.net/) is a set of libraries for
i386 machines to use various AVI codecs. Support is limited beyond
Linux. Windows provides native AVI support, and so doesn't need this
library. This module defines
......
......@@ -5,9 +5,8 @@
FindArmadillo
-------------
Find Armadillo
Find the Armadillo C++ library
Find the Armadillo C++ library.
Armadillo is library for linear algebra & scientific computing.
Using Armadillo:
......
......@@ -16,7 +16,7 @@ The module defines the following variables:
version of ``bison``
``BISON_FOUND``
true if the program was found
"True" if the program was found
The minimum required version of ``bison`` can be specified using the
standard CMake syntax, e.g. :command:`find_package(BISON 2.1.3)`.
......
......@@ -5,30 +5,30 @@
FindBacktrace
-------------
Find provider for backtrace(3).
Find provider for `backtrace(3) <http://man7.org/linux/man-pages/man3/backtrace.3.html>`__.
Checks if OS supports backtrace(3) via either libc or custom library.
Checks if OS supports ``backtrace(3)`` via either ``libc`` or custom library.
This module defines the following variables:
``Backtrace_HEADER``
The header file needed for backtrace(3). Cached.
The header file needed for ``backtrace(3)``. Cached.
Could be forcibly set by user.
``Backtrace_INCLUDE_DIRS``
The include directories needed to use backtrace(3) header.
The include directories needed to use ``backtrace(3)`` header.
``Backtrace_LIBRARIES``
The libraries (linker flags) needed to use backtrace(3), if any.
The libraries (linker flags) needed to use ``backtrace(3)``, if any.
``Backtrace_FOUND``
Is set if and only if backtrace(3) support detected.
Is set if and only if ``backtrace(3)`` support detected.
The following cache variables are also available to set or use:
``Backtrace_LIBRARY``
The external library providing backtrace, if any.
``Backtrace_INCLUDE_DIR``
The directory holding the backtrace(3) header.
The directory holding the ``backtrace(3)`` header.
Typical usage is to generate of header file using configure_file() with the
contents like the following::
Typical usage is to generate of header file using :command:`configure_file`
with the contents like the following::
#cmakedefine01 Backtrace_FOUND
#if Backtrace_FOUND
......
......@@ -27,16 +27,16 @@ Result Variables
This module defines the following variables:
``CURL_FOUND``
True if curl found.
"True" if ``curl`` found.
``CURL_INCLUDE_DIRS``
where to find curl/curl.h, etc.
where to find ``curl``/``curl.h``, etc.
``CURL_LIBRARIES``
List of libraries when using curl.
List of libraries when using ``curl``.
``CURL_VERSION_STRING``
The version of curl found.
The version of ``curl`` found.
#]=======================================================================]
find_package(PkgConfig QUIET)
......
......@@ -5,7 +5,7 @@
FindCVS
-------
Find the Concurrent Versions System (CVS).
The module defines the following variables:
......
......@@ -5,7 +5,7 @@
FindCups
--------
Find the CUPS printing system.
Find the Common UNIX Printing System (CUPS).
Set ``CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE`` to ``TRUE`` if you need a version which
features this function (i.e. at least ``1.1.19``)
......
......@@ -5,7 +5,7 @@
FindCxxTest
-----------
Find CxxTest
Find CxxTest unit testing framework.
Find the CxxTest suite and declare a helper macro for creating unit
tests and integrating them with CTest. For more details on CxxTest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment