Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
0e4fbb4a
Commit
0e4fbb4a
authored
Apr 05, 2019
by
Bartosz Kosiorek
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Help: Improve formatting of Help documentation
parent
ffcb4f7e
Changes
40
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
170 additions
and
161 deletions
+170
-161
Help/command/export.rst
Help/command/export.rst
+1
-1
Help/command/find_package.rst
Help/command/find_package.rst
+5
-5
Help/command/variable_requires.rst
Help/command/variable_requires.rst
+1
-1
Help/cpack_gen/nsis.rst
Help/cpack_gen/nsis.rst
+16
-16
Help/envvar/ASM_DIALECT.rst
Help/envvar/ASM_DIALECT.rst
+3
-2
Help/envvar/ASM_DIALECTFLAGS.rst
Help/envvar/ASM_DIALECTFLAGS.rst
+4
-4
Help/envvar/CTEST_INTERACTIVE_DEBUG_MODE.rst
Help/envvar/CTEST_INTERACTIVE_DEBUG_MODE.rst
+1
-1
Help/envvar/CTEST_OUTPUT_ON_FAILURE.rst
Help/envvar/CTEST_OUTPUT_ON_FAILURE.rst
+1
-1
Help/envvar/CTEST_PROGRESS_OUTPUT.rst
Help/envvar/CTEST_PROGRESS_OUTPUT.rst
+1
-1
Help/envvar/DASHBOARD_TEST_FROM_CTEST.rst
Help/envvar/DASHBOARD_TEST_FROM_CTEST.rst
+3
-2
Help/envvar/PackageName_ROOT.rst
Help/envvar/PackageName_ROOT.rst
+1
-1
Help/manual/LINKS.txt
Help/manual/LINKS.txt
+1
-1
Help/manual/OPTIONS_BUILD.txt
Help/manual/OPTIONS_BUILD.txt
+20
-20
Help/manual/ccmake.1.rst
Help/manual/ccmake.1.rst
+1
-1
Help/manual/cmake-buildsystem.7.rst
Help/manual/cmake-buildsystem.7.rst
+12
-12
Help/manual/cmake-gui.1.rst
Help/manual/cmake-gui.1.rst
+1
-1
Help/manual/cmake-packages.7.rst
Help/manual/cmake-packages.7.rst
+1
-1
Help/manual/cmake-toolchains.7.rst
Help/manual/cmake-toolchains.7.rst
+6
-6
Help/manual/cmake-variables.7.rst
Help/manual/cmake-variables.7.rst
+1
-1
Help/manual/cmake.1.rst
Help/manual/cmake.1.rst
+17
-16
Help/manual/cpack.1.rst
Help/manual/cpack.1.rst
+1
-1
Help/manual/ctest.1.rst
Help/manual/ctest.1.rst
+35
-34
Help/prop_sf/VS_CSHARP_tagname.rst
Help/prop_sf/VS_CSHARP_tagname.rst
+3
-2
Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst
Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst
+2
-1
Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst
Help/prop_sf/VS_DEPLOYMENT_LOCATION.rst
+2
-1
Help/prop_sf/VS_INCLUDE_IN_VSIX.rst
Help/prop_sf/VS_INCLUDE_IN_VSIX.rst
+3
-3
Help/prop_sf/VS_SHADER_FLAGS.rst
Help/prop_sf/VS_SHADER_FLAGS.rst
+1
-1
Help/prop_sf/VS_SHADER_TYPE.rst
Help/prop_sf/VS_SHADER_TYPE.rst
+1
-1
Help/prop_sf/VS_XAML_TYPE.rst
Help/prop_sf/VS_XAML_TYPE.rst
+2
-1
Help/prop_sf/WRAP_EXCLUDE.rst
Help/prop_sf/WRAP_EXCLUDE.rst
+5
-4
Help/release/3.9.rst
Help/release/3.9.rst
+1
-1
Help/variable/CMAKE_CROSSCOMPILING_EMULATOR.rst
Help/variable/CMAKE_CROSSCOMPILING_EMULATOR.rst
+1
-1
Help/variable/CMAKE_CUDA_HOST_COMPILER.rst
Help/variable/CMAKE_CUDA_HOST_COMPILER.rst
+1
-1
Help/variable/CMAKE_SKIP_INSTALL_RULES.rst
Help/variable/CMAKE_SKIP_INSTALL_RULES.rst
+1
-1
Help/variable/CMAKE_SOURCE_DIR.rst
Help/variable/CMAKE_SOURCE_DIR.rst
+1
-1
Help/variable/CMAKE_STAGING_PREFIX.rst
Help/variable/CMAKE_STAGING_PREFIX.rst
+5
-5
Help/variable/CMAKE_SUPPRESS_REGENERATION.rst
Help/variable/CMAKE_SUPPRESS_REGENERATION.rst
+4
-4
Help/variable/CMAKE_SYSROOT.rst
Help/variable/CMAKE_SYSROOT.rst
+2
-2
Help/variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst
.../variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION.rst
+1
-1
Help/variable/PackageName_ROOT.rst
Help/variable/PackageName_ROOT.rst
+1
-1
No files found.
Help/command/export.rst
View file @
0e4fbb4a
...
...
@@ -54,7 +54,7 @@ unspecified.
export(PACKAGE <PackageName>)
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
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
...
...
Help/command/find_package.rst
View file @
0e4fbb4a
...
...
@@ -180,7 +180,7 @@ sets these variables:
These
variables
are
checked
by
the
``
find_package
``
command
to
determine
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
:
``<
PackageName
>
_VERSION
``
...
...
@@ -220,8 +220,8 @@ Search Procedure
CMake
constructs
a
set
of
possible
installation
prefixes
for
the
package
.
Under
each
prefix
several
directories
are
searched
for
a
configuration
file
.
The
tables
below
show
the
directories
searched
.
Each
entry
is
meant
for
installation
trees
following
Windows
(
W
),
UNIX
(
U
),
or
Apple
(
A
)
conventions
::
Each
entry
is
meant
for
installation
trees
following
Windows
(
``
W
``
),
UNIX
(
``
U
``
),
or
Apple
(
``
A
``
)
conventions
::
<
prefix
>/
(
W
)
<
prefix
>/(
cmake
|
CMake
)/
(
W
)
...
...
@@ -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
>*/(
cmake
|
CMake
)/
(
W
/
U
)
On
systems
supporting
macOS
Frameworks
and
Application
Bundle
s
the
following
directories
are
searched
for
f
rameworks
or
b
undles
On
systems
supporting
macOS
:
prop_tgt
:`
FRAMEWORK
`
s
and
:
prop_tgt
:`
BUNDLE
`
s
the
following
directories
are
searched
for
F
rameworks
or
Application
B
undles
containing
a
configuration
file
::
<
prefix
>/<
name
>.
framework
/
Resources
/
(
A
)
...
...
Help/command/variable_requires.rst
View file @
0e4fbb4a
...
...
@@ -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``)
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
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.
Help/cpack_gen/nsis.rst
View file @
0e4fbb4a
CPack NSIS Generator
--------------------
CPack NSIS generator specific options
CPack
Nullsoft Scriptable Install System (
NSIS
)
generator specific options
Variables specific to CPack NSIS generator
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following variables are specific to the graphical installers built
on Windows
using the Nullsoft
Install
ation
System.
on Windows
Nullsoft Scriptable
Install System.
.. variable:: CPACK_NSIS_INSTALL_ROOT
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
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
...
...
@@ -31,11 +31,11 @@ on Windows using the Nullsoft Installation System.
.. 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
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
...
...
@@ -54,24 +54,24 @@ on Windows using the Nullsoft Installation System.
.. 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
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
found, ask the user whether to uninstall it before proceeding with the
install.
.. 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
directory should be added to the system PATH variable.
directory should be added to the system
``
PATH
``
variable.
.. 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
.. variable:: CPACK_NSIS_PACKAGE_NAME
...
...
@@ -97,8 +97,8 @@ on Windows using the Nullsoft Installation System.
.. variable:: CPACK_NSIS_<compName>_INSTALL_DIRECTORY
Custom install directory for the specified component <compName> instead
of $INSTDIR.
Custom install directory for the specified component
``
<compName>
``
instead
of
``
$INSTDIR
``
.
.. variable:: CPACK_NSIS_CREATE_ICONS_EXTRA
...
...
@@ -110,8 +110,8 @@ on Windows using the Nullsoft Installation System.
.. variable:: CPACK_NSIS_EXECUTABLES_DIRECTORY
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
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
executables are in an exec directory.
.. variable:: CPACK_NSIS_MUI_FINISHPAGE_RUN
...
...
@@ -121,8 +121,8 @@ on Windows using the Nullsoft Installation System.
.. variable:: CPACK_NSIS_MENU_LINKS
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
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
installation prefix. Like::
set(CPACK_NSIS_MENU_LINKS
...
...
Help/envvar/ASM_DIALECT.rst
View file @
0e4fbb4a
...
...
@@ -4,8 +4,9 @@ ASM<DIALECT>
.. include:: ENV_VAR.txt
Preferred executable for compiling a specific dialect of assembly language
files. ``ASM<DIALECT>`` can be ``ASM``, ``ASM_NASM``, ``ASM_MASM`` or
``ASM-ATT``. Will only be used by CMake on the first configuration to determine
files. ``ASM<DIALECT>`` can be ``ASM``, ``ASM_NASM`` (Netwide Assembler),
``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
in the cache as
:variable:`CMAKE_ASM<DIALECT>_COMPILER <CMAKE_<LANG>_COMPILER>`. For subsequent
...
...
Help/envvar/ASM_DIALECTFLAGS.rst
View file @
0e4fbb4a
...
...
@@ -6,8 +6,8 @@ ASM<DIALECT>FLAGS
Default compilation flags to be used when compiling a specific dialect of an
assembly language. ``ASM<DIALECT>FLAGS`` can be ``ASMFLAGS``, ``ASM_NASMFLAGS``,
``ASM_MASMFLAGS`` or ``ASM-ATTFLAGS``. Will only be used by CMake on the
first configuration to determine ``ASM<DIALECT>`` default compilation
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
first configuration to determine ``ASM
_
<DIALECT>`` default compilation
flags, after
which the value for ``ASM<DIALECT>FLAGS`` is stored in the cache as
`
`CMAKE_ASM<DIALECT>_FLAGS <CMAKE_<LANG>_FLAGS>`
`
. For any configuration
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.
Help/envvar/CTEST_INTERACTIVE_DEBUG_MODE.rst
View file @
0e4fbb4a
...
...
@@ -4,4 +4,4 @@ CTEST_INTERACTIVE_DEBUG_MODE
.. include:: ENV_VAR.txt
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.
Help/envvar/CTEST_OUTPUT_ON_FAILURE.rst
View file @
0e4fbb4a
...
...
@@ -4,6 +4,6 @@ CTEST_OUTPUT_ON_FAILURE
.. include:: ENV_VAR.txt
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
tests.
Help/envvar/CTEST_PROGRESS_OUTPUT.rst
View file @
0e4fbb4a
...
...
@@ -4,7 +4,7 @@ CTEST_PROGRESS_OUTPUT
.. include:: ENV_VAR.txt
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
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
...
...
Help/envvar/DASHBOARD_TEST_FROM_CTEST.rst
View file @
0e4fbb4a
...
...
@@ -3,5 +3,6 @@ DASHBOARD_TEST_FROM_CTEST
.. include:: ENV_VAR.txt
Environment variable that will exist when a test executed by CTest is run
in non-interactive mode. The value will be equal to :variable:`CMAKE_VERSION`.
Environment variable that will exist when a test executed by :manual:`ctest(1)`
is run in non-interactive mode. The value will be equal to
:variable:`CMAKE_VERSION`.
Help/envvar/PackageName_ROOT.rst
View file @
0e4fbb4a
...
...
@@ -5,7 +5,7 @@
Calls to :command:`find_package(<PackageName>)` will search in prefixes
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
prefixes specified in the ``Foo_ROOT`` environment variable (if set).
See policy :policy:`CMP0074`.
...
...
Help/manual/LINKS.txt
View file @
0e4fbb4a
...
...
@@ -14,7 +14,7 @@ Online Documentation and Community Resources
Mailing List
https://cmake.org/mailing-lists
For help and discussion about using
cm
ake, a mailing list is
For help and discussion about using
CM
ake, a mailing list is
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
documentation at https://cmake.org before posting questions to
...
...
Help/manual/OPTIONS_BUILD.txt
View file @
0e4fbb4a
...
...
@@ -9,23 +9,23 @@
``-C <initial-cache>``
Pre-load a script to populate the cache.
When
cm
ake is first run in an empty build tree, it creates a
CMakeCache.txt file and populates it with customizable settings for
When
CM
ake is first run in an empty build tree, it creates a
``
CMakeCache.txt
``
file and populates it with customizable settings for
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
cm
ake listfiles. The loaded entries take priority over the
CM
ake listfiles. The loaded entries take priority over the
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.
``-D <var>:<type>=<value>, -D <var>=<value>``
Create or update a
cm
ake
cache
entry.
Create or update a
CM
ake
``CACHE``
entry.
When
cm
ake is first run in an empty build tree, it creates a
CMakeCache.txt file and populates it with customizable settings for
When
CM
ake is first run in an empty build tree, it creates a
``
CMakeCache.txt
``
file and populates it with customizable settings for
the project. This option may be used to specify a setting that
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
specified by the :command:`set` command documentation for its
...
...
@@ -39,14 +39,14 @@
``-D<var>:<type>=<value>`` or ``-D<var>=<value>``.
``-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
CMakeCache.txt file, globbing expressions using
* and ?
are
supported. The option may be repeated for as many
cache
entries as
``
CMakeCache.txt
``
file, globbing expressions using
``*`` and ``?``
are
supported. The option may be repeated for as many
``CACHE``
entries as
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>``
Specify a build system generator.
...
...
@@ -74,47 +74,47 @@
Suppress developer warnings.
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.
``-Wdev``
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.
``-Werror=dev``
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.
``-Wno-error=dev``
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.
``-Wdeprecated``
Enable deprecated functionality warnings.
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``
Suppress deprecated functionality warnings.
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``
Make deprecated macro and function warnings errors.
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``
Make deprecated macro and function warnings not errors.
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.
Help/manual/ccmake.1.rst
View file @
0e4fbb4a
...
...
@@ -20,7 +20,7 @@ when the program is running.
CMake is a cross-platform build system generator. Projects specify
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
native tool on their platform.
...
...
Help/manual/cmake-buildsystem.7.rst
View file @
0e4fbb4a
...
...
@@ -21,7 +21,7 @@ Binary Targets
Executables and libraries are defined using the :command:`add_executable`
and :command:`add_library` commands. The resulting binary files have
appropriate pr
efixes, suffixes
and extensions for the platform targeted.
appropriate
:
pr
op_tgt:`PREFIX`, :prop_tgt:`SUFFIX`
and extensions for the platform targeted.
Dependencies between binary targets are expressed using the
:command:`target_link_libraries` command:
...
...
@@ -31,7 +31,7 @@ Dependencies between binary targets are expressed using the
add_executable(zipapp zipapp.cpp)
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``
is defined as an executable formed by compiling and linking ``zipapp.cpp``.
When linking the ``zipapp`` executable, the ``archive`` static library is
...
...
@@ -59,7 +59,7 @@ Binary Library Types
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:
.. code-block:: cmake
...
...
@@ -141,8 +141,8 @@ Alternatively, object libraries may be linked into other targets:
target_link_libraries(test_exe archive)
The link (or archiving) step of those other targets will use the object
files from
object
libraries that are *directly* linked. Additionally,
usage requirements of the
object
libraries will be honored when compiling
files from
``OBJECT``
libraries that are *directly* linked. Additionally,
usage requirements of the
``OBJECT``
libraries will be honored when compiling
sources in those other targets. Furthermore, those usage requirements
will propagate transitively to dependents of those other targets.
...
...
@@ -365,8 +365,8 @@ non-compatible requirements :manual:`cmake(1)` issues a diagnostic:
target_link_libraries(exe2 lib1 lib2)
The ``lib1`` requirement ``INTERFACE_POSITION_INDEPENDENT_CODE`` is not
"compatible" with the
`
`POSITION_INDEPENDENT_CODE`
`
property of
the ``exe1``
target. The library requires that consumers are built as
"compatible" with the
:prop_tgt:
`POSITION_INDEPENDENT_CODE` property of
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, so a diagnostic is issued.
...
...
@@ -547,10 +547,10 @@ is not known until build-time. Therefore, code such as
target_compile_definitions(exe1 PRIVATE DEBUG_BUILD)
endif()
may appear to work for
`
`Makefile
`` based and ``Ninja`` generators, but is not
portable to IDE generators. Additionally,
the :prop_tgt:`IMPORTED`
configuration-mappings are not accounted for
with code like this, so it should
be avoided.
may appear to work for
:ref:
`Makefile
Generators` and :generator:`Ninja`
generators, but is not
portable to IDE generators. Additionally,
the :prop_tgt:`IMPORTED`
configuration-mappings are not accounted for
with code like this, so it should
be avoided.
The unary ``TARGET_PROPERTY`` generator expression and the ``TARGET_POLICY``
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
be controlled by setting the :prop_tgt:`NO_SYSTEM_FROM_IMPORTED` target
property on the *consumers* of imported targets.
If a binary target is linked transitively to a
M
ac
OX framework
, the
If a binary target is linked transitively to a
m
ac
OS :prop_tgt:`FRAMEWORK`
, the
``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
directory.
...
...
Help/manual/cmake-gui.1.rst
View file @
0e4fbb4a
...
...
@@ -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
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
native tool on their platform.
...
...
Help/manual/cmake-packages.7.rst
View file @
0e4fbb4a
...
...
@@ -12,7 +12,7 @@ Introduction
Packages
provide
dependency
information
to
CMake
based
buildsystems
.
Packages
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
.
Using
Packages
...
...
Help/manual/cmake-toolchains.7.rst
View file @
0e4fbb4a
...
...
@@ -26,13 +26,13 @@ built-in variables, such as
:variable:`CMAKE_CXX_COMPILER_ID <CMAKE_<LANG>_COMPILER_ID>` etc are set by
invoking the :command:`project` command. If no project command
is in the top-level CMakeLists file, one will be implicitly generated. By default
the enabled languages are
C
and CXX:
the enabled languages are
``C``
and
``
CXX
``
:
.. code-block:: cmake
project(C_Only C)
A special value of NONE can also be used with the :command:`project` command
A special value of
``
NONE
``
can also be used with the :command:`project` command
to enable no languages:
.. code-block:: cmake
...
...
@@ -468,10 +468,10 @@ The following variables will be computed and provided automatically:
The Android ABI detected from the standalone toolchain.
:variable:`CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX`
The absolute path prefix to the binutils in the standalone toolchain.
The absolute path prefix to the
``
binutils
``
in the standalone toolchain.
:variable:`CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX`
The host platform suffix of the binutils in the standalone toolchain.
The host platform suffix of the
``
binutils
``
in the standalone toolchain.
For example, a toolchain file might contain:
...
...
@@ -533,7 +533,7 @@ generator is recommended. The :generator:`Unix Makefiles` or
:generator:`Ninja` generators can also be used, but they require the
project to handle more areas like target CPU selection and code signing.
Any of the three systems can be target
t
ed by setting the
Any of the three systems can be targeted by setting the
:variable:`CMAKE_SYSTEM_NAME` variable to a value from the table below.
By default, the latest Device SDK is chosen. As for all Apple platforms,
a different SDK (e.g. a simulator) can be selected by setting the
...
...
@@ -609,7 +609,7 @@ Code Signing
Some build artifacts for the embedded Apple platforms require mandatory
code signing. If the :generator:`Xcode` generator is being used and
code signing is required or desired, the developme
m
t team ID can be
code signing is required or desired, the developme
n
t team ID can be
specified via the ``CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM`` CMake variable.
This team ID will then be included in the generated Xcode project.
By default, CMake avoids the need for code signing during the internal
...
...
Help/manual/cmake-variables.7.rst
View file @
0e4fbb4a
...
...
@@ -7,7 +7,7 @@ cmake-variables(7)
.. contents::
This page
documents variables that are provided by CMake
This page documents variables that are provided by CMake
or have meaning to CMake when set by project code.
For general information on variables, see the
...
...
Help/manual/cmake.1.rst
View file @
0e4fbb4a
...
...
@@ -172,12 +172,12 @@ Options
``-L[A][H]``
List non-advanced cached variables.
List
cache
variables will run CMake and list all the variables from
the CMake
cache
that are not marked as INTERNAL or ADVANCED.
This
will effectively display current CMake settings, which can then be
changed with
-D
option. Changing some of the variables may result
in more variables being created. If
A
is specified, then it will
display also advanced variables. If
H
is specified, it will also
List
``CACHE``
variables will run CMake and list all the variables from
the CMake
``CACHE``
that are not marked as
``
INTERNAL
``
or
:prop_cache:`
ADVANCED
`
.
This
will effectively display current CMake settings, which can then be
changed with
``-D``
option. Changing some of the variables may result
in more variables being created. If
``A``
is specified, then it will
display also advanced variables. If
``H``
is specified, it will also
display help for each variable.
``-N``
...
...
@@ -201,9 +201,10 @@ Options
additional information such as the cache, log files etc.
``--debug-trycompile``
Do not delete the try_compile build tree. Only useful on one try_compile at a time.
Do not delete the :command:`try_compile` build tree.
Only useful on one :command:`try_compile` at a time.
Do not delete the files and directories created for try_compile
Do not delete the files and directories created for
:command:`
try_compile
`
calls. This is useful in debugging failed try_compiles. It may
however change the results of the try-compiles as old junk from a
previous try-compile may cause a different test to either pass or
...
...
@@ -214,7 +215,7 @@ Options
Put cmake in a debug mode.
Print extra information during the cmake run like stack traces with
message(send_error )
calls.
:command:`message(SEND_ERROR)`
calls.
``--trace``
Put cmake in trace mode.
...
...
@@ -251,8 +252,8 @@ Options
Find problems with variable usage in system files.
Normally, unused and uninitialized variables are searched for only
in CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR.
This flag tells CMake to
warn about other files as well.
in
:variable:`
CMAKE_SOURCE_DIR
`
and
:variable:`
CMAKE_BINARY_DIR
`
.
This flag tells CMake to
warn about other files as well.
.. _`Build Tool Mode`:
...
...
@@ -329,10 +330,10 @@ The options are:
Component-based install. Only install component ``<comp>``.
``--prefix <prefix>``
The installation prefix CMAKE_INSTALL_PREFIX.
The installation prefix
:variable:`
CMAKE_INSTALL_PREFIX
`
.
``--strip``
Strip before installing by setting CMAKE_INSTALL_DO_STRIP.
Strip before installing by setting
``
CMAKE_INSTALL_DO_STRIP
``
.
``-v, --verbose``
Enable verbose output.
...
...
@@ -363,8 +364,8 @@ Run a Script
Process the given cmake file as a script written in the CMake
language. No configure or generate step is performed and the cache
is not modified. If variables are defined using
-D
, this must be
done before the
-P
argument.
is not modified. If variables are defined using
``-D``
, this must be
done before the
``-P``
argument.
Run a Command-Line Tool
...
...
@@ -421,7 +422,7 @@ Available commands are:
``compare_files [--ignore-eol] <file1> <file2>``
Check if ``<file1>`` is same as ``<file2>``. If files are the same,
then returns
0
, if not it returns
1
. The ``--ignore-eol`` option
then returns
``0``
, if not it returns
``1``
. The ``--ignore-eol`` option
implies line-wise comparison and ignores LF/CRLF differences.
``copy <file>... <destination>``
...
...
Help/manual/cpack.1.rst
View file @
0e4fbb4a
...
...
@@ -63,7 +63,7 @@ Options
details. By default, ``CPackConfig.cmake`` in the current directory will
be used.
``--verbose,-V``
``--verbose,
-V``
Run ``cpack`` with verbose output. This can be used to show more details
from the package generation tools and is suitable for project developers.
...
...
Help/manual/ctest.1.rst
View file @
0e4fbb4a
...
...
@@ -22,8 +22,8 @@ Description
The
**
ctest
**
executable
is
the
CMake
test
driver
program
.
CMake
-
generated
build
trees
created
for
projects
that
use
the
ENABLE_TESTING
and
ADD_TEST
commands
have
testing
support
.
This
program
will
run
the
tests
and
report
results
.
:
command
:`
enable_testing
`
and
:
command
:`
add_test
`
commands
have
testing
support
.
This
program
will
run
the
tests
and
report
results
.
Options
=======
...
...
@@ -33,8 +33,8 @@ Options
Some
CMake
-
generated
build
trees
can
have
multiple
build
configurations
in
the
same
tree
.
This
option
can
be
used
to
specify
which
one
should
be
tested
.
Example
configurations
are
"
Debug
"
and
"
Release
"
.
which
one
should
be
tested
.
Example
configurations
are
``
Debug
``
and
``
Release
``
.
``--
progress
``
Enable
short
progress
output
from
tests
.
...
...
@@ -108,7 +108,7 @@ Options
``-
O
<
file
>,
--
output
-
log
<
file
>``
Output
to
log
file
.
This
option
tells
CTest
to
write
all
its
output
to
a
log
file
.
This
option
tells
CTest
to
write
all
its
output
to
a
``<
file
>``
log
file
.
``-
N
,--
show
-
only
[=<
format
>]``
Disable
actual
execution
of
tests
.
...
...
@@ -172,9 +172,10 @@ Options
Execute dashboard test.
This option tells CTest to act as a CDash client and perform a
dashboard test. All tests are <Mode><Test>, where Mode can be
Experimental, Nightly, and Continuous, and Test can be Start,
Update, Configure, Build, Test, Coverage, and Submit.
dashboard test. All tests are ``<Mode><Test>``, where ``<Mode>`` can be
``Experimental``, ``Nightly``, and ``Continuous``, and ``<Test>`` can be
``Start``, ``Update``, ``Configure``, ``Build``, ``Test``,
``Coverage``, and ``Submit``.
See `Dashboard Client`_.
...
...
@@ -229,10 +230,10 @@ Options
``-I [Start,End,Stride,test#,test#|Test file], --tests-information``