Browse Source

Merge topic 'improve_supported_language_docs'

b787be2714 Help: Update supported languages in project and enable_language

Acked-by: Kitware Robot <[email protected]>
Merge-request: !8101
Brad King 2 years ago
parent
commit
f9f34eb111
3 changed files with 31 additions and 31 deletions
  1. 25 0
      Help/command/SUPPORTED_LANGUAGES.txt
  2. 5 16
      Help/command/enable_language.rst
  3. 1 15
      Help/command/project.rst

+ 25 - 0
Help/command/SUPPORTED_LANGUAGES.txt

@@ -0,0 +1,25 @@
+
+Supported languages are ``C``, ``CXX`` (i.e.  C++), ``CSharp`` (i.e.  C#), ``CUDA``,
+``OBJC`` (i.e. Objective-C), ``OBJCXX`` (i.e. Objective-C++), ``Fortran``, ``HIP``,
+``ISPC``, ``Swift``, ``ASM``, ``ASM_NASM``, ``ASM_MARMASM``, ``ASM_MASM``, and ``ASM-ATT``.
+
+  .. versionadded:: 3.8
+    Added ``CSharp`` and ``CUDA`` support.
+
+  .. versionadded:: 3.15
+    Added ``Swift`` support.
+
+  .. versionadded:: 3.16
+    Added ``OBJC`` and ``OBJCXX`` support.
+
+  .. versionadded:: 3.18
+    Added ``ISPC`` support.
+
+  .. versionadded:: 3.21
+    Added ``HIP`` support.
+
+  .. versionadded:: 3.26
+    Added ``ASM_MARMASM`` support.
+
+If enabling ``ASM``, list it last so that CMake can check whether
+compilers for other languages like ``C`` work for assembly too.

+ 5 - 16
Help/command/enable_language.rst

@@ -9,24 +9,13 @@ Enable languages (CXX/C/OBJC/OBJCXX/Fortran/etc)
 
 Enables support for the named languages in CMake.  This is the same as
 the :command:`project` command but does not create any of the extra
-variables that are created by the project command.  Example languages
-are ``CXX``, ``C``, ``CUDA``, ``OBJC``, ``OBJCXX``, ``Fortran``,
-``HIP``, ``ISPC``, and ``ASM``.
+variables that are created by the project command.
 
-.. versionadded:: 3.8
-  Added ``CUDA`` support.
+.. include:: SUPPORTED_LANGUAGES.txt
 
-.. versionadded:: 3.16
-  Added ``OBJC`` and ``OBJCXX`` support.
-
-.. versionadded:: 3.18
-  Added ``ISPC`` support.
-
-.. versionadded:: 3.21
-  Added ``HIP`` support.
-
-If enabling ``ASM``, enable it last so that CMake can check whether
-compilers for other languages like ``C`` work for assembly too.
+By default ``C`` and ``CXX`` are enabled if no language options are given.
+Specify language ``NONE``, or use the ``LANGUAGES`` keyword and list no languages,
+to skip enabling any languages.
 
 This command must be called in file scope, not in a function call.
 Furthermore, it must be called in the highest directory common to all

+ 1 - 15
Help/command/project.rst

@@ -102,23 +102,9 @@ The options are:
   Can also be specified without ``LANGUAGES`` keyword per the first, short signature.
 
   Selects which programming languages are needed to build the project.
-  Supported languages include ``C``, ``CXX`` (i.e.  C++), ``CUDA``,
-  ``OBJC`` (i.e. Objective-C), ``OBJCXX``, ``Fortran``, ``HIP``, ``ISPC``, and ``ASM``.
-  By default ``C`` and ``CXX`` are enabled if no language options are given.
-  Specify language ``NONE``, or use the ``LANGUAGES`` keyword and list no languages,
-  to skip enabling any languages.
 
-  .. versionadded:: 3.8
-    Added ``CUDA`` support.
+.. include:: SUPPORTED_LANGUAGES.txt
 
-  .. versionadded:: 3.16
-    Added ``OBJC`` and ``OBJCXX`` support.
-
-  .. versionadded:: 3.18
-    Added ``ISPC`` support.
-
-  If enabling ``ASM``, list it last so that CMake can check whether
-  compilers for other languages like ``C`` work for assembly too.
 
 The variables set through the ``VERSION``, ``DESCRIPTION`` and ``HOMEPAGE_URL``
 options are intended for use as default values in package metadata and documentation.