Commit 0e4fbb4a authored by Bartosz Kosiorek's avatar Bartosz Kosiorek

Help: Improve formatting of Help documentation

parent ffcb4f7e
...@@ -54,7 +54,7 @@ unspecified. ...@@ -54,7 +54,7 @@ unspecified.
export(PACKAGE <PackageName>) export(PACKAGE <PackageName>)
Store the current build directory in the CMake user package registry Store the current build directory in the CMake user package registry
for package ``<PackageName>``. The find_package command may consider the for package ``<PackageName>``. The :command:`find_package` command may consider the
directory while searching for package ``<PackageName>``. This helps dependent directory while searching for package ``<PackageName>``. This helps dependent
projects find and use a package from the current project's build tree projects find and use a package from the current project's build tree
without help from the user. Note that the entry in the package without help from the user. Note that the entry in the package
......
...@@ -180,7 +180,7 @@ sets these variables: ...@@ -180,7 +180,7 @@ sets these variables:
These variables are checked by the ``find_package`` command to determine These variables are checked by the ``find_package`` command to determine
whether the configuration file provides an acceptable version. They whether the configuration file provides an acceptable version. They
are not available after the find_package call returns. If the version are not available after the ``find_package`` call returns. If the version
is acceptable the following variables are set: is acceptable the following variables are set:
``<PackageName>_VERSION`` ``<PackageName>_VERSION``
...@@ -220,8 +220,8 @@ Search Procedure ...@@ -220,8 +220,8 @@ Search Procedure
CMake constructs a set of possible installation prefixes for the CMake constructs a set of possible installation prefixes for the
package. Under each prefix several directories are searched for a package. Under each prefix several directories are searched for a
configuration file. The tables below show the directories searched. configuration file. The tables below show the directories searched.
Each entry is meant for installation trees following Windows (W), UNIX Each entry is meant for installation trees following Windows (``W``), UNIX
(U), or Apple (A) conventions:: (``U``), or Apple (``A``) conventions::
<prefix>/ (W) <prefix>/ (W)
<prefix>/(cmake|CMake)/ (W) <prefix>/(cmake|CMake)/ (W)
...@@ -234,8 +234,8 @@ Each entry is meant for installation trees following Windows (W), UNIX ...@@ -234,8 +234,8 @@ Each entry is meant for installation trees following Windows (W), UNIX
<prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/ (W/U) <prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/ (W/U)
<prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/(cmake|CMake)/ (W/U) <prefix>/<name>*/(lib/<arch>|lib*|share)/<name>*/(cmake|CMake)/ (W/U)
On systems supporting macOS Frameworks and Application Bundles the On systems supporting macOS :prop_tgt:`FRAMEWORK`s and :prop_tgt:`BUNDLE`s the
following directories are searched for frameworks or bundles following directories are searched for Frameworks or Application Bundles
containing a configuration file:: containing a configuration file::
<prefix>/<name>.framework/Resources/ (A) <prefix>/<name>.framework/Resources/ (A)
......
...@@ -18,5 +18,5 @@ tested, if that variable is false nothing else is done. If ...@@ -18,5 +18,5 @@ tested, if that variable is false nothing else is done. If
``TEST_VARIABLE`` is true, then the next argument (``RESULT_VARIABLE``) ``TEST_VARIABLE`` is true, then the next argument (``RESULT_VARIABLE``)
is a variable that is set to true if all the required variables are set. is a variable that is set to true if all the required variables are set.
The rest of the arguments are variables that must be true or not set The rest of the arguments are variables that must be true or not set
to NOTFOUND to avoid an error. If any are not true, an error is to ``NOTFOUND`` to avoid an error. If any are not true, an error is
reported. reported.
CPack NSIS Generator CPack NSIS Generator
-------------------- --------------------
CPack NSIS generator specific options CPack Nullsoft Scriptable Install System (NSIS) generator specific options
Variables specific to CPack NSIS generator Variables specific to CPack NSIS generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following variables are specific to the graphical installers built The following variables are specific to the graphical installers built
on Windows using the Nullsoft Installation System. on Windows Nullsoft Scriptable Install System.
.. variable:: CPACK_NSIS_INSTALL_ROOT .. variable:: CPACK_NSIS_INSTALL_ROOT
The default installation directory presented to the end user by the NSIS The default installation directory presented to the end user by the NSIS
installer is under this root dir. The full directory presented to the end installer is under this root dir. The full directory presented to the end
user is: ${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY} user is: ``${CPACK_NSIS_INSTALL_ROOT}/${CPACK_PACKAGE_INSTALL_DIRECTORY}``
.. variable:: CPACK_NSIS_MUI_ICON .. variable:: CPACK_NSIS_MUI_ICON
...@@ -31,11 +31,11 @@ on Windows using the Nullsoft Installation System. ...@@ -31,11 +31,11 @@ on Windows using the Nullsoft Installation System.
.. variable:: CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP .. variable:: CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP
The filename of a bitmap to use as the NSIS MUI_WELCOMEFINISHPAGE_BITMAP. The filename of a bitmap to use as the NSIS ``MUI_WELCOMEFINISHPAGE_BITMAP``.
.. variable:: CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP .. variable:: CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP
The filename of a bitmap to use as the NSIS MUI_UNWELCOMEFINISHPAGE_BITMAP. The filename of a bitmap to use as the NSIS ``MUI_UNWELCOMEFINISHPAGE_BITMAP``.
.. variable:: CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS .. variable:: CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS
...@@ -54,24 +54,24 @@ on Windows using the Nullsoft Installation System. ...@@ -54,24 +54,24 @@ on Windows using the Nullsoft Installation System.
.. variable:: CPACK_NSIS_COMPRESSOR .. variable:: CPACK_NSIS_COMPRESSOR
The arguments that will be passed to the NSIS SetCompressor command. The arguments that will be passed to the NSIS `SetCompressor command.
.. variable:: CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL .. variable:: CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL
Ask about uninstalling previous versions first. If this is set to "ON", Ask about uninstalling previous versions first. If this is set to ``ON``,
then an installer will look for previous installed versions and if one is then an installer will look for previous installed versions and if one is
found, ask the user whether to uninstall it before proceeding with the found, ask the user whether to uninstall it before proceeding with the
install. install.
.. variable:: CPACK_NSIS_MODIFY_PATH .. variable:: CPACK_NSIS_MODIFY_PATH
Modify PATH toggle. If this is set to "ON", then an extra page will appear Modify ``PATH`` toggle. If this is set to ``ON``, then an extra page will appear
in the installer that will allow the user to choose whether the program in the installer that will allow the user to choose whether the program
directory should be added to the system PATH variable. directory should be added to the system ``PATH`` variable.
.. variable:: CPACK_NSIS_DISPLAY_NAME .. variable:: CPACK_NSIS_DISPLAY_NAME
The display name string that appears in the Windows Add/Remove Program The display name string that appears in the Windows `Add/Remove Program`
control panel control panel
.. variable:: CPACK_NSIS_PACKAGE_NAME .. variable:: CPACK_NSIS_PACKAGE_NAME
...@@ -97,8 +97,8 @@ on Windows using the Nullsoft Installation System. ...@@ -97,8 +97,8 @@ on Windows using the Nullsoft Installation System.
.. variable:: CPACK_NSIS_<compName>_INSTALL_DIRECTORY .. variable:: CPACK_NSIS_<compName>_INSTALL_DIRECTORY
Custom install directory for the specified component <compName> instead Custom install directory for the specified component ``<compName>`` instead
of $INSTDIR. of ``$INSTDIR``.
.. variable:: CPACK_NSIS_CREATE_ICONS_EXTRA .. variable:: CPACK_NSIS_CREATE_ICONS_EXTRA
...@@ -110,8 +110,8 @@ on Windows using the Nullsoft Installation System. ...@@ -110,8 +110,8 @@ on Windows using the Nullsoft Installation System.
.. variable:: CPACK_NSIS_EXECUTABLES_DIRECTORY .. variable:: CPACK_NSIS_EXECUTABLES_DIRECTORY
Creating NSIS start menu links assumes that they are in 'bin' unless this Creating NSIS start menu links assumes that they are in ``bin`` unless this
variable is set. For example, you would set this to 'exec' if your variable is set. For example, you would set this to ``exec`` if your
executables are in an exec directory. executables are in an exec directory.
.. variable:: CPACK_NSIS_MUI_FINISHPAGE_RUN .. variable:: CPACK_NSIS_MUI_FINISHPAGE_RUN
...@@ -121,8 +121,8 @@ on Windows using the Nullsoft Installation System. ...@@ -121,8 +121,8 @@ on Windows using the Nullsoft Installation System.
.. variable:: CPACK_NSIS_MENU_LINKS .. variable:: CPACK_NSIS_MENU_LINKS
Specify links in [application] menu. This should contain a list of pair Specify links in ``[application]`` menu. This should contain a list of pair
"link" "link name". The link may be a URL or a path relative to ``link`` ``link name``. The link may be a URL or a path relative to
installation prefix. Like:: installation prefix. Like::
set(CPACK_NSIS_MENU_LINKS set(CPACK_NSIS_MENU_LINKS
......
...@@ -4,8 +4,9 @@ ASM<DIALECT> ...@@ -4,8 +4,9 @@ ASM<DIALECT>
.. include:: ENV_VAR.txt .. include:: ENV_VAR.txt
Preferred executable for compiling a specific dialect of assembly language Preferred executable for compiling a specific dialect of assembly language
files. ``ASM<DIALECT>`` can be ``ASM``, ``ASM_NASM``, ``ASM_MASM`` or files. ``ASM<DIALECT>`` can be ``ASM``, ``ASM_NASM`` (Netwide Assembler),
``ASM-ATT``. Will only be used by CMake on the first configuration to determine ``ASM_MASM`` (Microsoft Assembler) or ``ASM-ATT`` (Asembler AT&T).
Will only be used by CMake on the first configuration to determine
``ASM<DIALECT>`` compiler, after which the value for ``ASM<DIALECT>`` is stored ``ASM<DIALECT>`` compiler, after which the value for ``ASM<DIALECT>`` is stored
in the cache as in the cache as
:variable:`CMAKE_ASM<DIALECT>_COMPILER <CMAKE_<LANG>_COMPILER>`. For subsequent :variable:`CMAKE_ASM<DIALECT>_COMPILER <CMAKE_<LANG>_COMPILER>`. For subsequent
......
...@@ -6,8 +6,8 @@ ASM<DIALECT>FLAGS ...@@ -6,8 +6,8 @@ ASM<DIALECT>FLAGS
Default compilation flags to be used when compiling a specific dialect of an Default compilation flags to be used when compiling a specific dialect of an
assembly language. ``ASM<DIALECT>FLAGS`` can be ``ASMFLAGS``, ``ASM_NASMFLAGS``, assembly language. ``ASM<DIALECT>FLAGS`` can be ``ASMFLAGS``, ``ASM_NASMFLAGS``,
``ASM_MASMFLAGS`` or ``ASM-ATTFLAGS``. Will only be used by CMake on the ``ASM_MASMFLAGS`` or ``ASM-ATTFLAGS``. Will only be used by CMake on the
first configuration to determine ``ASM<DIALECT>`` default compilation flags, after first configuration to determine ``ASM_<DIALECT>`` default compilation
which the value for ``ASM<DIALECT>FLAGS`` is stored in the cache as flags, after which the value for ``ASM<DIALECT>FLAGS`` is stored in the cache as
:variable:`CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>`. For any configuration ``CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>``. For any configuration
run (including the first), the environment variable will be ignored if the run (including the first), the environment variable will be ignored if the
:variable:`CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>` variable is defined. ``CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>`` variable is defined.
...@@ -4,4 +4,4 @@ CTEST_INTERACTIVE_DEBUG_MODE ...@@ -4,4 +4,4 @@ CTEST_INTERACTIVE_DEBUG_MODE
.. include:: ENV_VAR.txt .. include:: ENV_VAR.txt
Environment variable that will exist and be set to ``1`` when a test executed Environment variable that will exist and be set to ``1`` when a test executed
by CTest is run in interactive mode. by :manual:`ctest(1)` is run in interactive mode.
...@@ -4,6 +4,6 @@ CTEST_OUTPUT_ON_FAILURE ...@@ -4,6 +4,6 @@ CTEST_OUTPUT_ON_FAILURE
.. include:: ENV_VAR.txt .. include:: ENV_VAR.txt
Boolean environment variable that controls if the output should be logged for Boolean environment variable that controls if the output should be logged for
failed tests. Set the value to 1, True, or ON to enable output on failure. failed tests. Set the value to ``1``, ``True``, or ``ON`` to enable output on failure.
See :manual:`ctest(1)` for more information on controlling output of failed See :manual:`ctest(1)` for more information on controlling output of failed
tests. tests.
...@@ -4,7 +4,7 @@ CTEST_PROGRESS_OUTPUT ...@@ -4,7 +4,7 @@ CTEST_PROGRESS_OUTPUT
.. include:: ENV_VAR.txt .. include:: ENV_VAR.txt
Boolean environment variable that affects how :manual:`ctest <ctest(1)>` Boolean environment variable that affects how :manual:`ctest <ctest(1)>`
command output reports overall progress. When set to 1, TRUE, ON or anything command output reports overall progress. When set to ``1``, ``TRUE``, ``ON`` or anything
else that evaluates to boolean true, progress is reported by repeatedly else that evaluates to boolean true, progress is reported by repeatedly
updating the same line. This greatly reduces the overall verbosity, but is updating the same line. This greatly reduces the overall verbosity, but is
only supported when output is sent directly to a terminal. If the environment only supported when output is sent directly to a terminal. If the environment
......
...@@ -3,5 +3,6 @@ DASHBOARD_TEST_FROM_CTEST ...@@ -3,5 +3,6 @@ DASHBOARD_TEST_FROM_CTEST
.. include:: ENV_VAR.txt .. include:: ENV_VAR.txt
Environment variable that will exist when a test executed by CTest is run Environment variable that will exist when a test executed by :manual:`ctest(1)`
in non-interactive mode. The value will be equal to :variable:`CMAKE_VERSION`. is run in non-interactive mode. The value will be equal to
:variable:`CMAKE_VERSION`.
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
Calls to :command:`find_package(<PackageName>)` will search in prefixes Calls to :command:`find_package(<PackageName>)` will search in prefixes
specified by the ``<PackageName>_ROOT`` environment variable, where specified by the ``<PackageName>_ROOT`` environment variable, where
``<PackageName>`` is the name given to the ``find_package`` call ``<PackageName>`` is the name given to the :command:`find_package` call
and ``_ROOT`` is literal. For example, ``find_package(Foo)`` will search and ``_ROOT`` is literal. For example, ``find_package(Foo)`` will search
prefixes specified in the ``Foo_ROOT`` environment variable (if set). prefixes specified in the ``Foo_ROOT`` environment variable (if set).
See policy :policy:`CMP0074`. See policy :policy:`CMP0074`.
......
...@@ -14,7 +14,7 @@ Online Documentation and Community Resources ...@@ -14,7 +14,7 @@ Online Documentation and Community Resources
Mailing List Mailing List
https://cmake.org/mailing-lists https://cmake.org/mailing-lists
For help and discussion about using cmake, a mailing list is For help and discussion about using CMake, a mailing list is
provided at cmake@cmake.org. The list is member-post-only but one provided at cmake@cmake.org. The list is member-post-only but one
may sign up on the CMake web page. Please first read the full may sign up on the CMake web page. Please first read the full
documentation at https://cmake.org before posting questions to documentation at https://cmake.org before posting questions to
......
...@@ -9,23 +9,23 @@ ...@@ -9,23 +9,23 @@
``-C <initial-cache>`` ``-C <initial-cache>``
Pre-load a script to populate the cache. Pre-load a script to populate the cache.
When cmake is first run in an empty build tree, it creates a When CMake is first run in an empty build tree, it creates a
CMakeCache.txt file and populates it with customizable settings for ``CMakeCache.txt`` file and populates it with customizable settings for
the project. This option may be used to specify a file from which the project. This option may be used to specify a file from which
to load cache entries before the first pass through the project's to load cache entries before the first pass through the project's
cmake listfiles. The loaded entries take priority over the CMake listfiles. The loaded entries take priority over the
project's default values. The given file should be a CMake script project's default values. The given file should be a CMake script
containing SET commands that use the CACHE option, not a containing :command:`set` commands that use the ``CACHE`` option, not a
cache-format file. cache-format file.
``-D <var>:<type>=<value>, -D <var>=<value>`` ``-D <var>:<type>=<value>, -D <var>=<value>``
Create or update a cmake cache entry. Create or update a CMake ``CACHE`` entry.
When cmake is first run in an empty build tree, it creates a When CMake is first run in an empty build tree, it creates a
CMakeCache.txt file and populates it with customizable settings for ``CMakeCache.txt`` file and populates it with customizable settings for
the project. This option may be used to specify a setting that the project. This option may be used to specify a setting that
takes priority over the project's default value. The option may be takes priority over the project's default value. The option may be
repeated for as many cache entries as desired. repeated for as many ``CACHE`` entries as desired.
If the ``:<type>`` portion is given it must be one of the types If the ``:<type>`` portion is given it must be one of the types
specified by the :command:`set` command documentation for its specified by the :command:`set` command documentation for its
...@@ -39,14 +39,14 @@ ...@@ -39,14 +39,14 @@
``-D<var>:<type>=<value>`` or ``-D<var>=<value>``. ``-D<var>:<type>=<value>`` or ``-D<var>=<value>``.
``-U <globbing_expr>`` ``-U <globbing_expr>``
Remove matching entries from CMake cache. Remove matching entries from CMake ``CACHE``.
This option may be used to remove one or more variables from the This option may be used to remove one or more variables from the
CMakeCache.txt file, globbing expressions using * and ? are ``CMakeCache.txt`` file, globbing expressions using ``*`` and ``?`` are
supported. The option may be repeated for as many cache entries as supported. The option may be repeated for as many ``CACHE`` entries as
desired. desired.
Use with care, you can make your CMakeCache.txt non-working. Use with care, you can make your ``CMakeCache.txt`` non-working.
``-G <generator-name>`` ``-G <generator-name>``
Specify a build system generator. Specify a build system generator.
...@@ -74,47 +74,47 @@ ...@@ -74,47 +74,47 @@
Suppress developer warnings. Suppress developer warnings.
Suppress warnings that are meant for the author of the Suppress warnings that are meant for the author of the
CMakeLists.txt files. By default this will also turn off ``CMakeLists.txt`` files. By default this will also turn off
deprecation warnings. deprecation warnings.
``-Wdev`` ``-Wdev``
Enable developer warnings. Enable developer warnings.
Enable warnings that are meant for the author of the CMakeLists.txt Enable warnings that are meant for the author of the ``CMakeLists.txt``
files. By default this will also turn on deprecation warnings. files. By default this will also turn on deprecation warnings.
``-Werror=dev`` ``-Werror=dev``
Make developer warnings errors. Make developer warnings errors.
Make warnings that are meant for the author of the CMakeLists.txt files Make warnings that are meant for the author of the ``CMakeLists.txt`` files
errors. By default this will also turn on deprecated warnings as errors. errors. By default this will also turn on deprecated warnings as errors.
``-Wno-error=dev`` ``-Wno-error=dev``
Make developer warnings not errors. Make developer warnings not errors.
Make warnings that are meant for the author of the CMakeLists.txt files not Make warnings that are meant for the author of the ``CMakeLists.txt`` files not
errors. By default this will also turn off deprecated warnings as errors. errors. By default this will also turn off deprecated warnings as errors.
``-Wdeprecated`` ``-Wdeprecated``
Enable deprecated functionality warnings. Enable deprecated functionality warnings.
Enable warnings for usage of deprecated functionality, that are meant Enable warnings for usage of deprecated functionality, that are meant
for the author of the CMakeLists.txt files. for the author of the ``CMakeLists.txt`` files.
``-Wno-deprecated`` ``-Wno-deprecated``
Suppress deprecated functionality warnings. Suppress deprecated functionality warnings.
Suppress warnings for usage of deprecated functionality, that are meant Suppress warnings for usage of deprecated functionality, that are meant
for the author of the CMakeLists.txt files. for the author of the ``CMakeLists.txt`` files.
``-Werror=deprecated`` ``-Werror=deprecated``
Make deprecated macro and function warnings errors. Make deprecated macro and function warnings errors.
Make warnings for usage of deprecated macros and functions, that are meant Make warnings for usage of deprecated macros and functions, that are meant
for the author of the CMakeLists.txt files, errors. for the author of the ``CMakeLists.txt`` files, errors.
``-Wno-error=deprecated`` ``-Wno-error=deprecated``
Make deprecated macro and function warnings not errors. Make deprecated macro and function warnings not errors.
Make warnings for usage of deprecated macros and functions, that are meant Make warnings for usage of deprecated macros and functions, that are meant
for the author of the CMakeLists.txt files, not errors. for the author of the ``CMakeLists.txt`` files, not errors.
...@@ -20,7 +20,7 @@ when the program is running. ...@@ -20,7 +20,7 @@ when the program is running.
CMake is a cross-platform build system generator. Projects specify CMake is a cross-platform build system generator. Projects specify
their build process with platform-independent CMake listfiles included their build process with platform-independent CMake listfiles included
in each directory of a source tree with the name CMakeLists.txt. in each directory of a source tree with the name ``CMakeLists.txt``.
Users build a project by using CMake to generate a build system for a Users build a project by using CMake to generate a build system for a
native tool on their platform. native tool on their platform.
......
...@@ -21,7 +21,7 @@ Binary Targets ...@@ -21,7 +21,7 @@ Binary Targets
Executables and libraries are defined using the :command:`add_executable` Executables and libraries are defined using the :command:`add_executable`
and :command:`add_library` commands. The resulting binary files have and :command:`add_library` commands. The resulting binary files have
appropriate prefixes, suffixes and extensions for the platform targeted. appropriate :prop_tgt:`PREFIX`, :prop_tgt:`SUFFIX` and extensions for the platform targeted.
Dependencies between binary targets are expressed using the Dependencies between binary targets are expressed using the
:command:`target_link_libraries` command: :command:`target_link_libraries` command:
...@@ -31,7 +31,7 @@ Dependencies between binary targets are expressed using the ...@@ -31,7 +31,7 @@ Dependencies between binary targets are expressed using the
add_executable(zipapp zipapp.cpp) add_executable(zipapp zipapp.cpp)
target_link_libraries(zipapp archive) target_link_libraries(zipapp archive)
``archive`` is defined as a static library -- an archive containing objects ``archive`` is defined as a ``STATIC`` library -- an archive containing objects
compiled from ``archive.cpp``, ``zip.cpp``, and ``lzma.cpp``. ``zipapp`` compiled from ``archive.cpp``, ``zip.cpp``, and ``lzma.cpp``. ``zipapp``
is defined as an executable formed by compiling and linking ``zipapp.cpp``. is defined as an executable formed by compiling and linking ``zipapp.cpp``.
When linking the ``zipapp`` executable, the ``archive`` static library is When linking the ``zipapp`` executable, the ``archive`` static library is
...@@ -59,7 +59,7 @@ Binary Library Types ...@@ -59,7 +59,7 @@ Binary Library Types
Normal Libraries Normal Libraries
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
By default, the :command:`add_library` command defines a static library, By default, the :command:`add_library` command defines a ``STATIC`` library,
unless a type is specified. A type may be specified when using the command: unless a type is specified. A type may be specified when using the command:
.. code-block:: cmake .. code-block:: cmake
...@@ -141,8 +141,8 @@ Alternatively, object libraries may be linked into other targets: ...@@ -141,8 +141,8 @@ Alternatively, object libraries may be linked into other targets:
target_link_libraries(test_exe archive) target_link_libraries(test_exe archive)
The link (or archiving) step of those other targets will use the object The link (or archiving) step of those other targets will use the object
files from object libraries that are *directly* linked. Additionally, files from ``OBJECT`` libraries that are *directly* linked. Additionally,
usage requirements of the object libraries will be honored when compiling usage requirements of the ``OBJECT`` libraries will be honored when compiling
sources in those other targets. Furthermore, those usage requirements sources in those other targets. Furthermore, those usage requirements
will propagate transitively to dependents of those other targets. will propagate transitively to dependents of those other targets.
...@@ -365,8 +365,8 @@ non-compatible requirements :manual:`cmake(1)` issues a diagnostic: ...@@ -365,8 +365,8 @@ non-compatible requirements :manual:`cmake(1)` issues a diagnostic:
target_link_libraries(exe2 lib1 lib2) target_link_libraries(exe2 lib1 lib2)
The ``lib1`` requirement ``INTERFACE_POSITION_INDEPENDENT_CODE`` is not The ``lib1`` requirement ``INTERFACE_POSITION_INDEPENDENT_CODE`` is not
"compatible" with the ``POSITION_INDEPENDENT_CODE`` property of the ``exe1`` "compatible" with the :prop_tgt:`POSITION_INDEPENDENT_CODE` property of
target. The library requires that consumers are built as the ``exe1`` target. The library requires that consumers are built as
position-independent-code, while the executable specifies to not built as position-independent-code, while the executable specifies to not built as
position-independent-code, so a diagnostic is issued. position-independent-code, so a diagnostic is issued.
...@@ -547,10 +547,10 @@ is not known until build-time. Therefore, code such as ...@@ -547,10 +547,10 @@ is not known until build-time. Therefore, code such as
target_compile_definitions(exe1 PRIVATE DEBUG_BUILD) target_compile_definitions(exe1 PRIVATE DEBUG_BUILD)
endif() endif()
may appear to work for ``Makefile`` based and ``Ninja`` generators, but is not may appear to work for :ref:`Makefile Generators` and :generator:`Ninja`
portable to IDE generators. Additionally, the :prop_tgt:`IMPORTED` generators, but is not portable to IDE generators. Additionally,
configuration-mappings are not accounted for with code like this, so it should the :prop_tgt:`IMPORTED` configuration-mappings are not accounted for
be avoided. with code like this, so it should be avoided.
The unary ``TARGET_PROPERTY`` generator expression and the ``TARGET_POLICY`` The unary ``TARGET_PROPERTY`` generator expression and the ``TARGET_POLICY``
generator expression are evaluated with the consuming target context. This generator expression are evaluated with the consuming target context. This
...@@ -699,7 +699,7 @@ found in those directories. This behavior for :ref:`imported targets` may ...@@ -699,7 +699,7 @@ found in those directories. This behavior for :ref:`imported targets` may
be controlled by setting the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target be controlled by setting the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target
property on the *consumers* of imported targets. property on the *consumers* of imported targets.
If a binary target is linked transitively to a Mac OX framework, the If a binary target is linked transitively to a macOS :prop_tgt:`FRAMEWORK`, the
``Headers`` directory of the framework is also treated as a usage requirement. ``Headers`` directory of the framework is also treated as a usage requirement.
This has the same effect as passing the framework directory as an include This has the same effect as passing the framework directory as an include
directory. directory.
......
...@@ -21,7 +21,7 @@ provided at the bottom of the window when the program is running. ...@@ -21,7 +21,7 @@ provided at the bottom of the window when the program is running.
CMake is a cross-platform build system generator. Projects specify CMake is a cross-platform build system generator. Projects specify
their build process with platform-independent CMake listfiles included their build process with platform-independent CMake listfiles included
in each directory of a source tree with the name CMakeLists.txt. in each directory of a source tree with the name ``CMakeLists.txt``.
Users build a project by using CMake to generate a build system for a Users build a project by using CMake to generate a build system for a
native tool on their platform. native tool on their platform.
......
...@@ -12,7 +12,7 @@ Introduction ...@@ -12,7 +12,7 @@ Introduction
Packages provide dependency information to CMake based buildsystems. Packages Packages provide dependency information to CMake based buildsystems. Packages
are found with the :command:`find_package` command. The result of are found with the :command:`find_package` command. The result of
using ``find_package`` is either a set of :prop_tgt:`IMPORTED` targets, or using :command:`find_package` is either a set of :prop_tgt:`IMPORTED` targets, or
a set of variables corresponding to build-relevant information.