diff options
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/target_compile_options.rst | 2 | ||||
-rw-r--r-- | Help/manual/cmake-developer.7.rst | 61 | ||||
-rw-r--r-- | Help/manual/cmake-properties.7.rst | 2 | ||||
-rw-r--r-- | Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst | 6 | ||||
-rw-r--r-- | Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst | 17 | ||||
-rw-r--r-- | Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst | 17 | ||||
-rw-r--r-- | Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst | 7 | ||||
-rw-r--r-- | Help/variable/CMAKE_BACKWARDS_COMPATIBILITY.rst | 9 |
8 files changed, 85 insertions, 36 deletions
diff --git a/Help/command/target_compile_options.rst b/Help/command/target_compile_options.rst index 88a4ea3..71d57f9 100644 --- a/Help/command/target_compile_options.rst +++ b/Help/command/target_compile_options.rst @@ -18,7 +18,7 @@ The INTERFACE, PUBLIC and PRIVATE keywords are required to specify the scope of the following arguments. PRIVATE and PUBLIC items will populate the COMPILE_OPTIONS property of <target>. PUBLIC and INTERFACE items will populate the INTERFACE_COMPILE_OPTIONS property -of <target>. The following arguments specify compile opitions. +of <target>. The following arguments specify compile options. Repeated calls for the same <target> append items in the order called. Arguments to target_compile_options may use "generator expressions" diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index eace3a4..198a240 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -230,30 +230,46 @@ The ``Modules`` directory contains CMake-language ``.cmake`` module files. Module Documentation -------------------- -To add a module to the CMake documentation, follow these steps: +To document CMake module ``Modules/<module-name>.cmake``, modify +``Help/manual/cmake-modules.7.rst`` to reference the module in the +``toctree`` directive, in sorted order, as:: -1. Add file ``Help/module/<module-name>.rst`` containing just the line:: + /module/<module-name> - .. cmake-module:: ../../Modules/<module-name>.cmake +Then add the module document file ``Help/module/<module-name>.rst`` +containing just the line:: -2. Modify ``Help/manual/cmake-modules.7.rst`` to reference the module in the - toctree directive as:: + .. cmake-module:: ../../Modules/<module-name>.cmake - /module/<module-name> +The ``cmake-module`` directive will scan the module file to extract +reStructuredText markup from comment blocks that start in ``.rst:``. +Add to the top of ``Modules/<module-name>.cmake`` a #-comment of the form: - Keep the toctree in sorted order! +.. code-block:: cmake + + #.rst: + # <module-name> + # ------------- + # + # <reStructuredText documentation of module> + +or a bracket-comment of the form: + +.. code-block:: cmake -3. Add to the top of ``Modules/<module-name>.cmake`` a #-comment of the form:: + #[[.rst: + <module-name> + ------------- + + <reStructuredText documentation of module> + #]] - #.rst: - # <module-name> - # ------------- - # - # ...reStructuredText documentation of module... +Any number of ``=`` may be used in the opening and closing brackets +as long as they match. Content on the line containing the closing +bracket is excluded if and only if the line starts in ``#``. - Comment blocks starting with the line ``#.rst:`` may appear anywhere - in the file. The ``cmake-module`` directive used above will scan the - file to extract reStructuredText markup from such comments. +Additional such ``.rst:`` comments may appear anywhere in the module file. +All such comments must start with ``#`` in the first column. For example, a ``Modules/Findxxx.cmake`` module may contain: @@ -275,12 +291,13 @@ For example, a ``Modules/Findxxx.cmake`` module may contain: <code> - #.rst: - # .. command:: xxx_do_something - # - # This command does something for Xxx:: - # - # xxx_do_something(some arguments) + #[========================================[.rst: + .. command:: xxx_do_something + + This command does something for Xxx:: + + xxx_do_something(some arguments) + #]========================================] macro(xxx_do_something) <code> endmacro() diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index 34a549c..6fbde74 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -81,6 +81,8 @@ Properties on Targets /prop_tgt/BUNDLE_EXTENSION /prop_tgt/BUNDLE /prop_tgt/COMPATIBLE_INTERFACE_BOOL + /prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX + /prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN /prop_tgt/COMPATIBLE_INTERFACE_STRING /prop_tgt/COMPILE_DEFINITIONS_CONFIG /prop_tgt/COMPILE_DEFINITIONS diff --git a/Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst b/Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst index 7f95ef0..6cf9d0a 100644 --- a/Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst +++ b/Help/prop_tgt/COMPATIBLE_INTERFACE_BOOL.rst @@ -9,9 +9,11 @@ boolean in the INTERFACE of all linked dependees. For example, if a property "FOO" appears in the list, then for each dependee, the "INTERFACE_FOO" property content in all of its dependencies must be consistent with each other, and with the "FOO" property in the -dependee. Consistency in this sense has the meaning that if the +depender. Consistency in this sense has the meaning that if the property is set, then it must have the same boolean value as all others, and if the property is not set, then it is ignored. Note that for each dependee, the set of properties from this property must not intersect with the set of properties from the -COMPATIBLE_INTERFACE_STRING property. +:prop_tgt:`COMPATIBLE_INTERFACE_STRING`, +:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MIN` or +:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MAX` property. diff --git a/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst b/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst new file mode 100644 index 0000000..2fe748e --- /dev/null +++ b/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX.rst @@ -0,0 +1,17 @@ +COMPATIBLE_INTERFACE_NUMBER_MAX +------------------------------- + +Properties whose maximum value from the link interface will be used. + +The COMPATIBLE_INTERFACE_NUMBER_MAX property may contain a list of +properties for this target whose maximum value may be read at generate time +when evaluated in the INTERFACE of all linked dependees. For example, if a +property "FOO" appears in the list, then for each dependee, the +"INTERFACE_FOO" property content in all of its dependencies will be compared +with each other and with the "FOO" property in the depender. When reading +the FOO property at generate time, the maximum value will be returned. +If the property is not set, then it is ignored. Note that for each +dependee, the set of properties from this property must not intersect +with the set of properties from the :prop_tgt:`COMPATIBLE_INTERFACE_BOOL`, +:prop_tgt:`COMPATIBLE_INTERFACE_STRING` or +:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MIN` property. diff --git a/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst b/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst new file mode 100644 index 0000000..7fe384b --- /dev/null +++ b/Help/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN.rst @@ -0,0 +1,17 @@ +COMPATIBLE_INTERFACE_NUMBER_MIN +------------------------------- + +Properties whose maximum value from the link interface will be used. + +The COMPATIBLE_INTERFACE_NUMBER_MIN property may contain a list of +properties for this target whose minimum value may be read at generate time +when evaluated in the INTERFACE of all linked dependees. For example, if a +property "FOO" appears in the list, then for each dependee, the +"INTERFACE_FOO" property content in all of its dependencies will be compared +with each other and with the "FOO" property in the depender. When reading +the FOO property at generate time, the minimum value will be returned. +If the property is not set, then it is ignored. Note that for each +dependee, the set of properties from this property must not intersect +with the set of properties from the :prop_tgt:`COMPATIBLE_INTERFACE_BOOL`, +:prop_tgt:`COMPATIBLE_INTERFACE_STRING` or +:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MAX` property. diff --git a/Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst b/Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst index a461f76..1794d87 100644 --- a/Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst +++ b/Help/prop_tgt/COMPATIBLE_INTERFACE_STRING.rst @@ -8,8 +8,9 @@ properties for this target which must be the same when evaluated as a string in the INTERFACE of all linked dependees. For example, if a property "FOO" appears in the list, then for each dependee, the "INTERFACE_FOO" property content in all of its dependencies must be -equal with each other, and with the "FOO" property in the dependee. +equal with each other, and with the "FOO" property in the depender. If the property is not set, then it is ignored. Note that for each dependee, the set of properties from this property must not intersect -with the set of properties from the COMPATIBLE_INTERFACE_BOOL -property. +with the set of properties from the :prop_tgt:`COMPATIBLE_INTERFACE_BOOL`, +:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MIN` or +:prop_tgt:`COMPATIBLE_INTERFACE_NUMBER_MAX` property. diff --git a/Help/variable/CMAKE_BACKWARDS_COMPATIBILITY.rst b/Help/variable/CMAKE_BACKWARDS_COMPATIBILITY.rst index 4015739..05c366a 100644 --- a/Help/variable/CMAKE_BACKWARDS_COMPATIBILITY.rst +++ b/Help/variable/CMAKE_BACKWARDS_COMPATIBILITY.rst @@ -1,11 +1,4 @@ CMAKE_BACKWARDS_COMPATIBILITY ----------------------------- -Version of cmake required to build project - -From the point of view of backwards compatibility, this specifies what -version of CMake should be supported. By default this value is the -version number of CMake that you are running. You can set this to an -older version of CMake to support deprecated commands of CMake in -projects that were written to use older versions of CMake. This can -be set by the user or set at the beginning of a CMakeLists file. +Deprecated. See CMake Policy :policy:`CMP0001` documentation. |