Browse Source

Help: Use CMake highlighting for command synopsis

Most of CMake commands use it. Fix a few of them to do the same.
Alex Turbov 3 years ago
parent
commit
8c6274326d

+ 1 - 1
Help/command/build_name.rst

@@ -5,7 +5,7 @@ Disallowed since version 3.0.  See CMake Policy :policy:`CMP0036`.
 
 Use ``${CMAKE_SYSTEM}`` and ``${CMAKE_CXX_COMPILER}`` instead.
 
-::
+.. code-block:: cmake
 
   build_name(variable)
 

+ 1 - 1
Help/command/ctest_build.rst

@@ -3,7 +3,7 @@ ctest_build
 
 Perform the :ref:`CTest Build Step` as a :ref:`Dashboard Client`.
 
-::
+.. code-block:: cmake
 
   ctest_build([BUILD <build-dir>] [APPEND]
               [CONFIGURATION <config>]

+ 1 - 1
Help/command/ctest_configure.rst

@@ -3,7 +3,7 @@ ctest_configure
 
 Perform the :ref:`CTest Configure Step` as a :ref:`Dashboard Client`.
 
-::
+.. code-block:: cmake
 
   ctest_configure([BUILD <build-dir>] [SOURCE <source-dir>] [APPEND]
                   [OPTIONS <options>] [RETURN_VALUE <result-var>] [QUIET]

+ 1 - 1
Help/command/ctest_coverage.rst

@@ -3,7 +3,7 @@ ctest_coverage
 
 Perform the :ref:`CTest Coverage Step` as a :ref:`Dashboard Client`.
 
-::
+.. code-block:: cmake
 
   ctest_coverage([BUILD <build-dir>] [APPEND]
                  [LABELS <label>...]

+ 2 - 2
Help/command/ctest_empty_binary_directory.rst

@@ -3,9 +3,9 @@ ctest_empty_binary_directory
 
 empties the binary directory
 
-::
+.. code-block:: cmake
 
-  ctest_empty_binary_directory( directory )
+  ctest_empty_binary_directory(<directory>)
 
 Removes a binary directory.  This command will perform some checks
 prior to deleting the directory in an attempt to avoid malicious or

+ 1 - 1
Help/command/ctest_memcheck.rst

@@ -3,7 +3,7 @@ ctest_memcheck
 
 Perform the :ref:`CTest MemCheck Step` as a :ref:`Dashboard Client`.
 
-::
+.. code-block:: cmake
 
   ctest_memcheck([BUILD <build-dir>] [APPEND]
                  [START <start-number>]

+ 2 - 2
Help/command/ctest_read_custom_files.rst

@@ -3,9 +3,9 @@ ctest_read_custom_files
 
 read CTestCustom files.
 
-::
+.. code-block:: cmake
 
-  ctest_read_custom_files( directory ... )
+  ctest_read_custom_files(<directory>...)
 
 Read all the CTestCustom.ctest or CTestCustom.cmake files from the
 given directory.

+ 1 - 1
Help/command/ctest_run_script.rst

@@ -3,7 +3,7 @@ ctest_run_script
 
 runs a :option:`ctest -S` script
 
-::
+.. code-block:: cmake
 
   ctest_run_script([NEW_PROCESS] script_file_name script_file_name1
               script_file_name2 ... [RETURN_VALUE var])

+ 2 - 2
Help/command/ctest_sleep.rst

@@ -3,13 +3,13 @@ ctest_sleep
 
 sleeps for some amount of time
 
-::
+.. code-block:: cmake
 
   ctest_sleep(<seconds>)
 
 Sleep for given number of seconds.
 
-::
+.. code-block:: cmake
 
   ctest_sleep(<time1> <duration> <time2>)
 

+ 1 - 1
Help/command/ctest_start.rst

@@ -3,7 +3,7 @@ ctest_start
 
 Starts the testing for a given model
 
-::
+.. code-block:: cmake
 
   ctest_start(<model> [<source> [<binary>]] [GROUP <group>] [QUIET])
 

+ 2 - 2
Help/command/ctest_submit.rst

@@ -3,7 +3,7 @@ ctest_submit
 
 Perform the :ref:`CTest Submit Step` as a :ref:`Dashboard Client`.
 
-::
+.. code-block:: cmake
 
   ctest_submit([PARTS <part>...] [FILES <file>...]
                [SUBMIT_URL <url>]
@@ -96,7 +96,7 @@ Submit to CDash Upload API
 
 .. versionadded:: 3.2
 
-::
+.. code-block:: cmake
 
   ctest_submit(CDASH_UPLOAD <file> [CDASH_UPLOAD_TYPE <type>]
                [SUBMIT_URL <url>]

+ 2 - 2
Help/command/ctest_test.rst

@@ -3,7 +3,7 @@ ctest_test
 
 Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
 
-::
+.. code-block:: cmake
 
   ctest_test([BUILD <build-dir>] [APPEND]
              [START <start-number>]
@@ -30,7 +30,7 @@ Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
              )
 
 ..
-   _note: If updating the argument list here, please also update the argument
+   NOTE If updating the argument list here, please also update the argument
    list documentation for :command:`ctest_memcheck` as well.
 
 Run tests in the project build tree and store results in

+ 1 - 1
Help/command/ctest_update.rst

@@ -3,7 +3,7 @@ ctest_update
 
 Perform the :ref:`CTest Update Step` as a :ref:`Dashboard Client`.
 
-::
+.. code-block:: cmake
 
   ctest_update([SOURCE <source-dir>]
                [RETURN_VALUE <result-var>]

+ 1 - 1
Help/command/ctest_upload.rst

@@ -3,7 +3,7 @@ ctest_upload
 
 Upload files to a dashboard server as a :ref:`Dashboard Client`.
 
-::
+.. code-block:: cmake
 
   ctest_upload(FILES <file>... [QUIET] [CAPTURE_CMAKE_ERROR <result-var>])
 

+ 1 - 1
Help/command/exec_program.rst

@@ -8,7 +8,7 @@ exec_program
 Run an executable program during the processing of the CMakeList.txt
 file.
 
-::
+.. code-block:: cmake
 
   exec_program(Executable [directory in which to run]
                [ARGS <arguments to executable>]

+ 1 - 1
Help/command/export_library_dependencies.rst

@@ -15,7 +15,7 @@ The old-style library dependencies file does not take into account
 per-configuration names of libraries or the
 :prop_tgt:`LINK_INTERFACE_LIBRARIES` target property.
 
-::
+.. code-block:: cmake
 
   export_library_dependencies(<file> [APPEND])
 

+ 3 - 3
Help/command/install_files.rst

@@ -11,7 +11,7 @@ directly replaced by the ``FILES`` form of the :command:`install`
 command.  The regexp form can be expressed more clearly using the ``GLOB``
 form of the :command:`file` command.
 
-::
+.. code-block:: cmake
 
   install_files(<dir> extension file file ...)
 
@@ -23,14 +23,14 @@ removed first.  This is useful for providing lists of source files
 such as foo.cxx when you want the corresponding foo.h to be installed.
 A typical extension is ``.h``.
 
-::
+.. code-block:: cmake
 
   install_files(<dir> regexp)
 
 Any files in the current source directory that match the regular
 expression will be installed.
 
-::
+.. code-block:: cmake
 
   install_files(<dir> FILES file file ...)
 

+ 2 - 2
Help/command/install_programs.rst

@@ -11,7 +11,7 @@ directly replaced by the ``PROGRAMS`` form of the :command:`install`
 command.  The regexp form can be expressed more clearly using the ``GLOB``
 form of the :command:`file` command.
 
-::
+.. code-block:: cmake
 
   install_programs(<dir> file1 file2 [file3 ...])
   install_programs(<dir> FILES file1 [file2 ...])
@@ -20,7 +20,7 @@ Create rules to install the listed programs into the given directory.
 Use the ``FILES`` argument to guarantee that the file list version of the
 command will be used even when there is only one argument.
 
-::
+.. code-block:: cmake
 
   install_programs(<dir> regexp)
 

+ 1 - 1
Help/command/install_targets.rst

@@ -8,7 +8,7 @@ install_targets
 This command has been superseded by the :command:`install` command.  It is
 provided for compatibility with older CMake code.
 
-::
+.. code-block:: cmake
 
   install_targets(<dir> [RUNTIME_DIRECTORY dir] target target)
 

+ 2 - 2
Help/command/load_command.rst

@@ -5,7 +5,7 @@ Disallowed since version 3.0.  See CMake Policy :policy:`CMP0031`.
 
 Load a command into a running CMake.
 
-::
+.. code-block:: cmake
 
   load_command(COMMAND_NAME <loc1> [loc2 ...])
 
@@ -15,7 +15,7 @@ added to the set of available CMake commands.  Usually,
 :command:`try_compile` is used before this command to compile the
 module.  If the command is successfully loaded a variable named
 
-::
+.. code-block:: cmake
 
   CMAKE_LOADED_COMMAND_<COMMAND_NAME>
 

+ 1 - 1
Help/command/make_directory.rst

@@ -5,7 +5,7 @@ make_directory
 
   Use the :command:`file(MAKE_DIRECTORY)` command instead.
 
-::
+.. code-block:: cmake
 
   make_directory(directory)
 

+ 1 - 1
Help/command/output_required_files.rst

@@ -9,7 +9,7 @@ This command exists only because ancient CMake versions provided it.
 CMake handles preprocessor dependency scanning automatically using a
 more advanced scanner.
 
-::
+.. code-block:: cmake
 
   output_required_files(srcfile outputfile)
 

+ 1 - 1
Help/command/remove.rst

@@ -5,7 +5,7 @@ remove
 
   Use the :command:`list(REMOVE_ITEM)` command instead.
 
-::
+.. code-block:: cmake
 
   remove(VAR VALUE VALUE ...)
 

+ 1 - 1
Help/command/subdir_depends.rst

@@ -5,7 +5,7 @@ Disallowed since version 3.0.  See CMake Policy :policy:`CMP0029`.
 
 Does nothing.
 
-::
+.. code-block:: cmake
 
   subdir_depends(subdir dep1 dep2 ...)
 

+ 1 - 1
Help/command/subdirs.rst

@@ -7,7 +7,7 @@ subdirs
 
 Add a list of subdirectories to the build.
 
-::
+.. code-block:: cmake
 
   subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]
           [PREORDER] )

+ 1 - 1
Help/command/use_mangled_mesa.rst

@@ -5,7 +5,7 @@ Disallowed since version 3.0.  See CMake Policy :policy:`CMP0030`.
 
 Copy mesa headers for use in combination with system GL.
 
-::
+.. code-block:: cmake
 
   use_mangled_mesa(PATH_TO_MESA OUTPUT_DIRECTORY)
 

+ 1 - 1
Help/command/utility_source.rst

@@ -5,7 +5,7 @@ Disallowed since version 3.0.  See CMake Policy :policy:`CMP0034`.
 
 Specify the source tree of a third-party utility.
 
-::
+.. code-block:: cmake
 
   utility_source(cache_entry executable_name
                  path_to_source [file1 file2 ...])

+ 1 - 1
Help/command/variable_requires.rst

@@ -7,7 +7,7 @@ Use the :command:`if` command instead.
 
 Assert satisfaction of an option's required variables.
 
-::
+.. code-block:: cmake
 
   variable_requires(TEST_VARIABLE RESULT_VARIABLE
                     REQUIRED_VARIABLE1

+ 1 - 1
Help/command/write_file.rst

@@ -5,7 +5,7 @@ write_file
 
   Use the :command:`file(WRITE)` command instead.
 
-::
+.. code-block:: cmake
 
   write_file(filename "message to write"... [APPEND])