summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/add_compile_definitions.rst6
-rw-r--r--Help/command/add_library.rst1
-rw-r--r--Help/command/cmake_minimum_required.rst4
-rw-r--r--Help/command/cmake_policy.rst5
-rw-r--r--Help/command/install.rst8
-rw-r--r--Help/command/math.rst18
-rw-r--r--Help/command/target_link_libraries.rst2
7 files changed, 38 insertions, 6 deletions
diff --git a/Help/command/add_compile_definitions.rst b/Help/command/add_compile_definitions.rst
index 37f6650..48815d4 100644
--- a/Help/command/add_compile_definitions.rst
+++ b/Help/command/add_compile_definitions.rst
@@ -8,9 +8,9 @@ Adds preprocessor definitions to the compilation of source files.
add_compile_definitions(<definition> ...)
Adds preprocessor definitions to the compiler command line for targets in the
-current directory and below that are added after this command is invoked.
-See documentation of the :prop_dir:`directory <COMPILE_DEFINITIONS>` and
-:prop_tgt:`target <COMPILE_DEFINITIONS>` ``COMPILE_DEFINITIONS`` properties.
+current directory and below (whether added before or after this command is
+invoked). See documentation of the :prop_dir:`directory <COMPILE_DEFINITIONS>`
+and :prop_tgt:`target <COMPILE_DEFINITIONS>` ``COMPILE_DEFINITIONS`` properties.
Definitions are specified using the syntax ``VAR`` or ``VAR=value``.
Function-style definitions are not supported. CMake will automatically
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst
index 8fa0df7..5d31c7c 100644
--- a/Help/command/add_library.rst
+++ b/Help/command/add_library.rst
@@ -150,6 +150,7 @@ the interface target using the commands:
* :command:`set_property`,
* :command:`target_link_libraries(INTERFACE)`,
+* :command:`target_link_options(INTERFACE)`,
* :command:`target_include_directories(INTERFACE)`,
* :command:`target_compile_options(INTERFACE)`,
* :command:`target_compile_definitions(INTERFACE)`, and
diff --git a/Help/command/cmake_minimum_required.rst b/Help/command/cmake_minimum_required.rst
index 7c02190..2f1ab60 100644
--- a/Help/command/cmake_minimum_required.rst
+++ b/Help/command/cmake_minimum_required.rst
@@ -13,6 +13,10 @@ If the running version of CMake is lower than the ``<min>`` required
version it will stop processing the project and report an error.
The optional ``<max>`` version, if specified, must be at least the
``<min>`` version and affects policy settings as described below.
+If the running version of CMake is older than 3.12, the extra ``...``
+dots will be seen as version component separators, resulting in the
+``...<max>`` part being ignored and preserving the pre-3.12 behavior
+of basing policies on ``<min>``.
The ``FATAL_ERROR`` option is accepted but ignored by CMake 2.6 and
higher. It should be specified so CMake versions 2.4 and lower fail
diff --git a/Help/command/cmake_policy.rst b/Help/command/cmake_policy.rst
index 6a8dd62..c3f7cfb 100644
--- a/Help/command/cmake_policy.rst
+++ b/Help/command/cmake_policy.rst
@@ -30,7 +30,10 @@ encourage projects to set policies based on CMake versions::
``major.minor[.patch[.tweak]]``, and the ``...`` is literal. The ``<min>``
version must be at least ``2.4`` and at most the running version of CMake.
The ``<max>`` version, if specified, must be at least the ``<min>`` version
-but may exceed the running version of CMake.
+but may exceed the running version of CMake. If the running version of
+CMake is older than 3.12, the extra ``...`` dots will be seen as version
+component separators, resulting in the ``...<max>`` part being ignored and
+preserving the pre-3.12 behavior of basing policies on ``<min>``.
This specifies that the current CMake code is written for the given
range of CMake versions. All policies known to the running version of CMake
diff --git a/Help/command/install.rst b/Help/command/install.rst
index 08cbc56..8b2a971 100644
--- a/Help/command/install.rst
+++ b/Help/command/install.rst
@@ -280,6 +280,14 @@ targets that link to the object libraries in their implementation.
Installing a target with the :prop_tgt:`EXCLUDE_FROM_ALL` target property
set to ``TRUE`` has undefined behavior.
+:command:`install(TARGETS)` can install targets that were created in
+other directories. When using such cross-directory install rules, running
+``make install`` (or similar) from a subdirectory will not guarantee that
+targets from other directories are up-to-date. You can use
+:command:`target_link_libraries` or :command:`add_dependencies`
+to ensure that such out-of-directory targets are built before the
+subdirectory-specific install rules are run.
+
The install destination given to the target install ``DESTINATION`` may
use "generator expressions" with the syntax ``$<...>``. See the
:manual:`cmake-generator-expressions(7)` manual for available expressions.
diff --git a/Help/command/math.rst b/Help/command/math.rst
index f99dc3d..63af931 100644
--- a/Help/command/math.rst
+++ b/Help/command/math.rst
@@ -5,10 +5,26 @@ Mathematical expressions.
::
- math(EXPR <output-variable> <math-expression>)
+ math(EXPR <output-variable> <math-expression> [OUTPUT_FORMAT <format>])
``EXPR`` evaluates mathematical expression and returns result in the
output variable. Example mathematical expression is ``5 * (10 + 13)``.
Supported operators are ``+``, ``-``, ``*``, ``/``, ``%``, ``|``, ``&``,
``^``, ``~``, ``<<``, ``>>``, and ``(...)``. They have the same meaning
as they do in C code.
+
+Numeric constants are evaluated in decimal or hexadecimal representation.
+
+The result is formatted according to the option "OUTPUT_FORMAT" ,
+where ``<format>`` is one of:
+::
+
+ HEXADECIMAL = Result in output variable will be formatted in C code
+ Hexadecimal notation.
+ DECIMAL = Result in output variable will be formatted in decimal notation.
+
+
+For example::
+
+ math(EXPR value "100 * 0xA" DECIMAL) results in value is set to "1000"
+ math(EXPR value "100 * 0xA" HEXADECIMAL) results in value is set to "0x3e8"
diff --git a/Help/command/target_link_libraries.rst b/Help/command/target_link_libraries.rst
index edf38cf..1f0d69e 100644
--- a/Help/command/target_link_libraries.rst
+++ b/Help/command/target_link_libraries.rst
@@ -18,7 +18,7 @@ All of them have the general form::
target_link_libraries(<target> ... <item>... ...)
-The named ``<target>`` must have been created by
+The named ``<target>`` must have been created in the current directory by
a command such as :command:`add_executable` or :command:`add_library` and
must not be an :ref:`ALIAS target <Alias Targets>`.
Repeated calls for the same ``<target>`` append items in the order called.