Преглед изворни кода

Help: Use `code-block:: cmake` instead of `::` for sub-commands descriptions

Most of CMake commands use syntax highlighting when describe
sub-commands syntax. Fix a few of them to be like others...
Alex Turbov пре 3 година
родитељ
комит
f98c8707f4
2 измењених фајлова са 21 додато и 21 уклоњено
  1. 1 1
      Help/command/cmake_host_system_information.rst
  2. 20 20
      Help/command/cmake_path.rst

+ 1 - 1
Help/command/cmake_host_system_information.rst

@@ -17,7 +17,7 @@ Synopsis
 Query host system specific information
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-::
+.. code-block:: cmake
 
   cmake_host_system_information(RESULT <variable> QUERY <key> ...)
 

+ 20 - 20
Help/command/cmake_path.rst

@@ -237,7 +237,7 @@ The following forms of the ``GET`` subcommand each retrieve a different
 component or group of components from a path.  See
 `Path Structure And Terminology`_ for the meaning of each path component.
 
-::
+.. code-block:: cmake
 
   cmake_path(GET <path-var> ROOT_NAME <out-var>)
   cmake_path(GET <path-var> ROOT_DIRECTORY <out-var>)
@@ -408,7 +408,7 @@ meaning of each path component.
 .. _HAS_RELATIVE_PART:
 .. _HAS_PARENT_PATH:
 
-::
+.. code-block:: cmake
 
   cmake_path(HAS_ROOT_NAME <path-var> <out-var>)
   cmake_path(HAS_ROOT_DIRECTORY <path-var> <out-var>)
@@ -432,7 +432,7 @@ Note the following special cases:
 
 .. _IS_ABSOLUTE:
 
-::
+.. code-block:: cmake
 
   cmake_path(IS_ABSOLUTE <path-var> <out-var>)
 
@@ -446,7 +446,7 @@ false while ``HAS_ROOT_DIRECTORY`` can be true.
 
 .. _IS_RELATIVE:
 
-::
+.. code-block:: cmake
 
   cmake_path(IS_RELATIVE <path-var> <out-var>)
 
@@ -454,7 +454,7 @@ This will store the opposite of ``IS_ABSOLUTE`` in ``<out-var>``.
 
 .. _IS_PREFIX:
 
-::
+.. code-block:: cmake
 
   cmake_path(IS_PREFIX <path-var> <input> [NORMALIZE] <out-var>)
 
@@ -476,7 +476,7 @@ are :ref:`normalized <Normalization>` before the check.
 .. _Path COMPARE:
 .. _COMPARE:
 
-::
+.. code-block:: cmake
 
   cmake_path(COMPARE <input1> EQUAL <input2> <out-var>)
   cmake_path(COMPARE <input1> NOT_EQUAL <input2> <out-var>)
@@ -510,7 +510,7 @@ Modification
 
 .. _cmake_path-SET:
 
-::
+.. code-block:: cmake
 
   cmake_path(SET <path-var> [NORMALIZE] <input>)
 
@@ -539,7 +539,7 @@ Output::
 
 .. _APPEND:
 
-::
+.. code-block:: cmake
 
   cmake_path(APPEND <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
 
@@ -570,7 +570,7 @@ the following algorithm (pseudo-code) applies:
 
 .. _APPEND_STRING:
 
-::
+.. code-block:: cmake
 
   cmake_path(APPEND_STRING <path-var> [<input>...] [OUTPUT_VARIABLE <out-var>])
 
@@ -579,7 +579,7 @@ Append all the ``<input>`` arguments to the ``<path-var>`` without adding any
 
 .. _REMOVE_FILENAME:
 
-::
+.. code-block:: cmake
 
   cmake_path(REMOVE_FILENAME <path-var> [OUTPUT_VARIABLE <out-var>])
 
@@ -609,7 +609,7 @@ Output::
 
 .. _REPLACE_FILENAME:
 
-::
+.. code-block:: cmake
 
   cmake_path(REPLACE_FILENAME <path-var> <input> [OUTPUT_VARIABLE <out-var>])
 
@@ -628,7 +628,7 @@ equivalent to the following:
 
 .. _REMOVE_EXTENSION:
 
-::
+.. code-block:: cmake
 
   cmake_path(REMOVE_EXTENSION <path-var> [LAST_ONLY]
                                          [OUTPUT_VARIABLE <out-var>])
@@ -637,7 +637,7 @@ Removes the :ref:`extension <EXTENSION_DEF>`, if any, from ``<path-var>``.
 
 .. _REPLACE_EXTENSION:
 
-::
+.. code-block:: cmake
 
   cmake_path(REPLACE_EXTENSION <path-var> [LAST_ONLY] <input>
                                [OUTPUT_VARIABLE <out-var>])
@@ -661,7 +661,7 @@ Generation
 
 .. _NORMAL_PATH:
 
-::
+.. code-block:: cmake
 
   cmake_path(NORMAL_PATH <path-var> [OUTPUT_VARIABLE <out-var>])
 
@@ -670,7 +670,7 @@ Normalize ``<path-var>`` according the steps described in :ref:`Normalization`.
 .. _cmake_path-RELATIVE_PATH:
 .. _RELATIVE_PATH:
 
-::
+.. code-block:: cmake
 
   cmake_path(RELATIVE_PATH <path-var> [BASE_DIRECTORY <input>]
                                       [OUTPUT_VARIABLE <out-var>])
@@ -686,7 +686,7 @@ as that used by C++
 
 .. _ABSOLUTE_PATH:
 
-::
+.. code-block:: cmake
 
   cmake_path(ABSOLUTE_PATH <path-var> [BASE_DIRECTORY <input>] [NORMALIZE]
                                       [OUTPUT_VARIABLE <out-var>])
@@ -713,7 +713,7 @@ target platform when cross-compiling.
 .. _cmake_path-NATIVE_PATH:
 .. _NATIVE_PATH:
 
-::
+.. code-block:: cmake
 
   cmake_path(NATIVE_PATH <path-var> [NORMALIZE] <out-var>)
 
@@ -727,7 +727,7 @@ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized
 .. _cmake_path-TO_CMAKE_PATH_LIST:
 .. _TO_CMAKE_PATH_LIST:
 
-::
+.. code-block:: cmake
 
   cmake_path(CONVERT <input> TO_CMAKE_PATH_LIST <out-var> [NORMALIZE])
 
@@ -749,7 +749,7 @@ When the ``NORMALIZE`` option is specified, the path is :ref:`normalized
 .. _cmake_path-TO_NATIVE_PATH_LIST:
 .. _TO_NATIVE_PATH_LIST:
 
-::
+.. code-block:: cmake
 
   cmake_path(CONVERT <input> TO_NATIVE_PATH_LIST <out-var> [NORMALIZE])
 
@@ -788,7 +788,7 @@ Hashing
 
 .. _HASH:
 
-::
+.. code-block:: cmake
 
     cmake_path(HASH <path-var> <out-var>)