summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-04 16:42:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-10-04 16:43:24 (GMT)
commitc55a41c9b2fea1617ad2a0a50760e4f8b6e42a47 (patch)
tree12616c224f1302c14cb8a8c893f89b4e89b18fbb /Help
parentb2726f13bdd2caffcd27dd5c7ebf3211169a40e4 (diff)
parent4a0485be7f4ab06201c478f5a46111ab1e8e773e (diff)
downloadCMake-c55a41c9b2fea1617ad2a0a50760e4f8b6e42a47.zip
CMake-c55a41c9b2fea1617ad2a0a50760e4f8b6e42a47.tar.gz
CMake-c55a41c9b2fea1617ad2a0a50760e4f8b6e42a47.tar.bz2
Merge topic 'default_extensions'
4a0485be7f cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logic 29e2b85171 Tests: Simplify RunCMake.CompileFeatures introspection fc3a1cbdd8 CompilerID: Compiler extensions default detection 2adfd95d79 CompilerID: Rename language_dialect to language_standard 00055d7779 Help: Document CMAKE_<LANG>_STANDARD_DEFAULT a65bee4cfc Help: Document HIP standard/extensions properties and variables a40ff1bb5a Help: Make language standard/extensions variable pages less wordy 3feff8379b Help: Generic language standard and extension variables documentation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6177
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-compile-features.7.rst11
-rw-r--r--Help/manual/cmake-policies.7.rst1
-rw-r--r--Help/manual/cmake-properties.7.rst6
-rw-r--r--Help/manual/cmake-variables.7.rst8
-rw-r--r--Help/policy/CMP0128.rst78
-rw-r--r--Help/prop_tgt/HIP_EXTENSIONS.rst19
-rw-r--r--Help/prop_tgt/HIP_STANDARD.rst48
-rw-r--r--Help/prop_tgt/HIP_STANDARD_REQUIRED.rst19
-rw-r--r--Help/prop_tgt/LANG_EXTENSIONS.rst23
-rw-r--r--Help/prop_tgt/LANG_STANDARD.rst26
-rw-r--r--Help/prop_tgt/LANG_STANDARD_REQUIRED.rst26
-rw-r--r--Help/release/dev/compile-features-standard-logic-rework.rst10
-rw-r--r--Help/variable/CMAKE_CUDA_EXTENSIONS.rst7
-rw-r--r--Help/variable/CMAKE_CUDA_STANDARD.rst7
-rw-r--r--Help/variable/CMAKE_CUDA_STANDARD_REQUIRED.rst7
-rw-r--r--Help/variable/CMAKE_CXX_EXTENSIONS.rst7
-rw-r--r--Help/variable/CMAKE_CXX_STANDARD.rst7
-rw-r--r--Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst7
-rw-r--r--Help/variable/CMAKE_C_EXTENSIONS.rst7
-rw-r--r--Help/variable/CMAKE_C_STANDARD.rst7
-rw-r--r--Help/variable/CMAKE_C_STANDARD_REQUIRED.rst7
-rw-r--r--Help/variable/CMAKE_HIP_EXTENSIONS.rst10
-rw-r--r--Help/variable/CMAKE_HIP_STANDARD.rst10
-rw-r--r--Help/variable/CMAKE_HIP_STANDARD_REQUIRED.rst10
-rw-r--r--Help/variable/CMAKE_LANG_EXTENSIONS.rst19
-rw-r--r--Help/variable/CMAKE_LANG_EXTENSIONS_DEFAULT.rst7
-rw-r--r--Help/variable/CMAKE_LANG_STANDARD.rst19
-rw-r--r--Help/variable/CMAKE_LANG_STANDARD_DEFAULT.rst7
-rw-r--r--Help/variable/CMAKE_LANG_STANDARD_REQUIRED.rst19
-rw-r--r--Help/variable/CMAKE_OBJCXX_EXTENSIONS.rst7
-rw-r--r--Help/variable/CMAKE_OBJCXX_STANDARD.rst7
-rw-r--r--Help/variable/CMAKE_OBJCXX_STANDARD_REQUIRED.rst7
-rw-r--r--Help/variable/CMAKE_OBJC_EXTENSIONS.rst7
-rw-r--r--Help/variable/CMAKE_OBJC_STANDARD.rst7
-rw-r--r--Help/variable/CMAKE_OBJC_STANDARD_REQUIRED.rst7
-rw-r--r--Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst2
36 files changed, 402 insertions, 81 deletions
diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst
index 2b0de11..a0459fa 100644
--- a/Help/manual/cmake-compile-features.7.rst
+++ b/Help/manual/cmake-compile-features.7.rst
@@ -118,14 +118,13 @@ as well as any dependents (that may include headers from ``mylib``).
Availability of Compiler Extensions
-----------------------------------
-Because the :prop_tgt:`CXX_EXTENSIONS` target property is ``ON`` by default,
-CMake uses extended variants of language dialects by default, such as
-``-std=gnu++11`` instead of ``-std=c++11``. That target property may be
-set to ``OFF`` to use the non-extended variant of the dialect flag. Note
-that because most compilers enable extensions by default, this could
-expose cross-platform bugs in user code or in the headers of third-party
+The :prop_tgt:`<LANG>_EXTENSIONS` target property defaults to the compiler's
+efault. Note that because most compilers enable extensions by default, this
+may expose cross-platform bugs in user code or in the headers of third-party
dependencies.
+:prop_tgt:`<LANG>_EXTENSIONS` used to default to ``ON``. See :policy:`CMP0128`.
+
Optional Compile Features
=========================
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 0f0c0ab..3df4f9f 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -57,6 +57,7 @@ Policies Introduced by CMake 3.22
.. toctree::
:maxdepth: 1
+ CMP0128: Selection of language standard and extension flags improved. </policy/CMP0128>
CMP0127: cmake_dependent_option() supports full Condition Syntax. </policy/CMP0127>
Policies Introduced by CMake 3.21
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index c71e8ff..bb5dba3 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -215,6 +215,9 @@ Properties on Targets
/prop_tgt/GNUtoMS
/prop_tgt/HAS_CXX
/prop_tgt/HIP_ARCHITECTURES
+ /prop_tgt/HIP_EXTENSIONS
+ /prop_tgt/HIP_STANDARD
+ /prop_tgt/HIP_STANDARD_REQUIRED
/prop_tgt/IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
/prop_tgt/IMPORTED
/prop_tgt/IMPORTED_COMMON_LANGUAGE_RUNTIME
@@ -274,8 +277,11 @@ Properties on Targets
/prop_tgt/LANG_COMPILER_LAUNCHER
/prop_tgt/LANG_CPPCHECK
/prop_tgt/LANG_CPPLINT
+ /prop_tgt/LANG_EXTENSIONS
/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE
/prop_tgt/LANG_LINKER_LAUNCHER
+ /prop_tgt/LANG_STANDARD
+ /prop_tgt/LANG_STANDARD_REQUIRED
/prop_tgt/LANG_VISIBILITY_PRESET
/prop_tgt/LIBRARY_OUTPUT_DIRECTORY
/prop_tgt/LIBRARY_OUTPUT_DIRECTORY_CONFIG
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 7cfa0c8..d78ae37 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -528,6 +528,9 @@ Variables for Languages
/variable/CMAKE_Fortran_MODDIR_FLAG
/variable/CMAKE_Fortran_MODOUT_FLAG
/variable/CMAKE_HIP_ARCHITECTURES
+ /variable/CMAKE_HIP_EXTENSIONS
+ /variable/CMAKE_HIP_STANDARD
+ /variable/CMAKE_HIP_STANDARD_REQUIRED
/variable/CMAKE_ISPC_HEADER_DIRECTORY
/variable/CMAKE_ISPC_HEADER_SUFFIX
/variable/CMAKE_ISPC_INSTRUCTION_SETS
@@ -549,6 +552,8 @@ Variables for Languages
/variable/CMAKE_LANG_CREATE_SHARED_LIBRARY
/variable/CMAKE_LANG_CREATE_SHARED_MODULE
/variable/CMAKE_LANG_CREATE_STATIC_LIBRARY
+ /variable/CMAKE_LANG_EXTENSIONS
+ /variable/CMAKE_LANG_EXTENSIONS_DEFAULT
/variable/CMAKE_LANG_FLAGS
/variable/CMAKE_LANG_FLAGS_CONFIG
/variable/CMAKE_LANG_FLAGS_CONFIG_INIT
@@ -577,8 +582,11 @@ Variables for Languages
/variable/CMAKE_LANG_SIMULATE_VERSION
/variable/CMAKE_LANG_SIZEOF_DATA_PTR
/variable/CMAKE_LANG_SOURCE_FILE_EXTENSIONS
+ /variable/CMAKE_LANG_STANDARD
+ /variable/CMAKE_LANG_STANDARD_DEFAULT
/variable/CMAKE_LANG_STANDARD_INCLUDE_DIRECTORIES
/variable/CMAKE_LANG_STANDARD_LIBRARIES
+ /variable/CMAKE_LANG_STANDARD_REQUIRED
/variable/CMAKE_OBJC_EXTENSIONS
/variable/CMAKE_OBJC_STANDARD
/variable/CMAKE_OBJC_STANDARD_REQUIRED
diff --git a/Help/policy/CMP0128.rst b/Help/policy/CMP0128.rst
new file mode 100644
index 0000000..f341f24
--- /dev/null
+++ b/Help/policy/CMP0128.rst
@@ -0,0 +1,78 @@
+CMP0128
+-------
+
+.. versionadded:: 3.22
+
+When this policy is set to ``NEW``:
+
+* :prop_tgt:`<LANG>_EXTENSIONS` is initialized to
+ :variable:`CMAKE_<LANG>_EXTENSIONS_DEFAULT`.
+
+* Extensions are correctly disabled/enabled if :prop_tgt:`<LANG>_STANDARD` is
+ unset.
+
+* Standard mode-affecting flags aren't added unless necessary to achieve the
+ specified mode.
+
+The ``OLD`` behavior:
+
+* Initializes :prop_tgt:`<LANG>_EXTENSIONS` to ``ON``.
+
+* Always adds a flag if :prop_tgt:`<LANG>_STANDARD` is set and
+ :prop_tgt:`<LANG>_STANDARD_REQUIRED` is ``OFF``.
+
+* If :prop_tgt:`<LANG>_STANDARD` is unset:
+
+ * Doesn't disable extensions even if :prop_tgt:`<LANG>_EXTENSIONS` is
+ ``OFF``.
+
+ * Fails to enable extensions if :prop_tgt:`<LANG>_EXTENSIONS` is ``ON``
+ except for the ``IAR`` compiler.
+
+Code may need to be updated for the ``NEW`` behavior in the following cases:
+
+* If :prop_tgt:`<LANG>_EXTENSIONS` matches
+ :variable:`CMAKE_<LANG>_EXTENSIONS_DEFAULT` or is unset and the compiler's
+ default satisfies :prop_tgt:`<LANG>_STANDARD` but the compiled code requires
+ the exact standard specified.
+ Such code should set :prop_tgt:`<LANG>_STANDARD_REQUIRED` to ``ON``.
+
+ For example:
+
+ .. code-block:: cmake
+
+ cmake_minimum_required(VERSION |release|)
+ project(example C)
+
+ add_executable(exe main.c)
+ set_property(TARGET exe PROPERTY C_STANDARD 99)
+
+ If the compiler defaults to C11 then the standard specification for C99 is
+ satisfied and CMake will pass no flags. ``main.c`` will no longer compile if
+ it is incompatible with C11.
+
+* If a standard mode flag previously overridden by CMake's and not used during
+ compiler detection now takes effect due to CMake no longer adding one as the
+ default detected is appropriate.
+
+ Such code should be converted to either:
+
+ * Use :prop_tgt:`<LANG>_STANDARD` and :prop_tgt:`<LANG>_EXTENSIONS` instead
+ of manually adding flags.
+
+ * Or ensure the manually-specified flags are used during compiler detection.
+
+If compiler flags affecting the standard mode are used during compiler
+detection (for example in :manual:`a toolchain file <cmake-toolchains(7)>`
+using :variable:`CMAKE_<LANG>_FLAGS_INIT`) then they will affect the detected
+default :variable:`standard <CMAKE_<LANG>_STANDARD_DEFAULT>` and
+:variable:`extensions <CMAKE_<LANG>_EXTENSIONS_DEFAULT>`.
+
+Unlike many policies, CMake version |release| does *not* warn when the policy
+is not set and simply uses the ``OLD`` behavior. Use the
+:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
+See documentation of the
+:variable:`CMAKE_POLICY_WARNING_CMP0128 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
+variable to control the warning.
+
+.. include:: DEPRECATED.txt
diff --git a/Help/prop_tgt/HIP_EXTENSIONS.rst b/Help/prop_tgt/HIP_EXTENSIONS.rst
new file mode 100644
index 0000000..b731753
--- /dev/null
+++ b/Help/prop_tgt/HIP_EXTENSIONS.rst
@@ -0,0 +1,19 @@
+HIP_EXTENSIONS
+--------------
+
+.. versionadded:: 3.21
+
+Boolean specifying whether compiler specific extensions are requested.
+
+This property specifies whether compiler specific extensions should be
+used. For some compilers, this results in adding a flag such
+as ``-std=gnu++11`` instead of ``-std=c++11`` to the compile line. This
+property is ``ON`` by default. The basic HIP/C++ standard level is
+controlled by the :prop_tgt:`HIP_STANDARD` target property.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
+
+This property is initialized by the value of
+the :variable:`CMAKE_HIP_EXTENSIONS` variable if it is set when a target
+is created.
diff --git a/Help/prop_tgt/HIP_STANDARD.rst b/Help/prop_tgt/HIP_STANDARD.rst
new file mode 100644
index 0000000..0c767c6
--- /dev/null
+++ b/Help/prop_tgt/HIP_STANDARD.rst
@@ -0,0 +1,48 @@
+HIP_STANDARD
+------------
+
+.. versionadded:: 3.21
+
+The HIP/C++ standard requested to build this target.
+
+Supported values are:
+
+``98``
+ HIP C++98
+
+``11``
+ HIP C++11
+
+``14``
+ HIP C++14
+
+``17``
+ HIP C++17
+
+``20``
+ HIP C++20
+
+``23``
+ HIP C++23
+
+If the value requested does not result in a compile flag being added for
+the compiler in use, a previous standard flag will be added instead. This
+means that using:
+
+.. code-block:: cmake
+
+ set_property(TARGET tgt PROPERTY HIP_STANDARD 11)
+
+with a compiler which does not support ``-std=gnu++11`` or an equivalent
+flag will not result in an error or warning, but will instead add the
+``-std=gnu++98`` flag if supported. This "decay" behavior may be controlled
+with the :prop_tgt:`HIP_STANDARD_REQUIRED` target property.
+Additionally, the :prop_tgt:`HIP_EXTENSIONS` target property may be used to
+control whether compiler-specific extensions are enabled on a per-target basis.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
+
+This property is initialized by the value of
+the :variable:`CMAKE_HIP_STANDARD` variable if it is set when a target
+is created.
diff --git a/Help/prop_tgt/HIP_STANDARD_REQUIRED.rst b/Help/prop_tgt/HIP_STANDARD_REQUIRED.rst
new file mode 100644
index 0000000..e56209a
--- /dev/null
+++ b/Help/prop_tgt/HIP_STANDARD_REQUIRED.rst
@@ -0,0 +1,19 @@
+HIP_STANDARD_REQUIRED
+---------------------
+
+.. versionadded:: 3.21
+
+Boolean describing whether the value of :prop_tgt:`HIP_STANDARD` is a requirement.
+
+If this property is set to ``ON``, then the value of the
+:prop_tgt:`HIP_STANDARD` target property is treated as a requirement. If this
+property is ``OFF`` or unset, the :prop_tgt:`HIP_STANDARD` target property is
+treated as optional and may "decay" to a previous standard if the requested is
+not available.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
+
+This property is initialized by the value of
+the :variable:`CMAKE_HIP_STANDARD_REQUIRED` variable if it is set when a
+target is created.
diff --git a/Help/prop_tgt/LANG_EXTENSIONS.rst b/Help/prop_tgt/LANG_EXTENSIONS.rst
new file mode 100644
index 0000000..2add21d
--- /dev/null
+++ b/Help/prop_tgt/LANG_EXTENSIONS.rst
@@ -0,0 +1,23 @@
+<LANG>_EXTENSIONS
+-----------------
+
+The variations are:
+
+* :prop_tgt:`C_EXTENSIONS`
+* :prop_tgt:`CXX_EXTENSIONS`
+* :prop_tgt:`CUDA_EXTENSIONS`
+* :prop_tgt:`HIP_EXTENSIONS`
+* :prop_tgt:`OBJC_EXTENSIONS`
+* :prop_tgt:`OBJCXX_EXTENSIONS`
+
+These properties specify whether compiler-specific extensions are requested.
+
+These properties are initialized by the value of the
+:variable:`CMAKE_<LANG>_EXTENSIONS` variable if it is set when a target is
+created.
+
+For supported CMake versions see the respective pages.
+To control language standard versions see :prop_tgt:`<LANG>_STANDARD`.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/prop_tgt/LANG_STANDARD.rst b/Help/prop_tgt/LANG_STANDARD.rst
new file mode 100644
index 0000000..bd377ec
--- /dev/null
+++ b/Help/prop_tgt/LANG_STANDARD.rst
@@ -0,0 +1,26 @@
+<LANG>_STANDARD
+---------------
+
+The variations are:
+
+* :prop_tgt:`C_STANDARD`
+* :prop_tgt:`CXX_STANDARD`
+* :prop_tgt:`CUDA_STANDARD`
+* :prop_tgt:`HIP_STANDARD`
+* :prop_tgt:`OBJC_STANDARD`
+* :prop_tgt:`OBJCXX_STANDARD`
+
+These properties specify language standard versions which are requested. When a
+newer standard is specified than is supported by the compiler, then it will
+fallback to the latest supported standard. This "decay" behavior may be
+controlled with the :prop_tgt:`<LANG>_STANDARD_REQUIRED` target property.
+
+These properties are initialized by the value of the
+:variable:`CMAKE_<LANG>_STANDARD` variable if it is set when a target is
+created.
+
+For supported values and CMake versions see the respective pages.
+To control compiler-specific extensions see :prop_tgt:`<LANG>_EXTENSIONS`.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/prop_tgt/LANG_STANDARD_REQUIRED.rst b/Help/prop_tgt/LANG_STANDARD_REQUIRED.rst
new file mode 100644
index 0000000..56ecef8
--- /dev/null
+++ b/Help/prop_tgt/LANG_STANDARD_REQUIRED.rst
@@ -0,0 +1,26 @@
+<LANG>_STANDARD_REQUIRED
+------------------------
+
+The variations are:
+
+* :prop_tgt:`C_STANDARD_REQUIRED`
+* :prop_tgt:`CXX_STANDARD_REQUIRED`
+* :prop_tgt:`CUDA_STANDARD_REQUIRED`
+* :prop_tgt:`HIP_STANDARD_REQUIRED`
+* :prop_tgt:`OBJC_STANDARD_REQUIRED`
+* :prop_tgt:`OBJCXX_STANDARD_REQUIRED`
+
+These properties specify whether the value of :prop_tgt:`<LANG>_STANDARD` is a
+requirement. When ``OFF`` or unset, the :prop_tgt:`<LANG>_STANDARD` target
+property is treated as optional and may "decay" to a previous standard if the
+requested is not available.
+
+These properties are initialized by the value of the
+:variable:`CMAKE_<LANG>_STANDARD_REQUIRED` variable if it is set when a target
+is created.
+
+For supported CMake versions see the respective pages.
+To control language standard versions see :prop_tgt:`<LANG>_STANDARD`.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/release/dev/compile-features-standard-logic-rework.rst b/Help/release/dev/compile-features-standard-logic-rework.rst
new file mode 100644
index 0000000..432a756
--- /dev/null
+++ b/Help/release/dev/compile-features-standard-logic-rework.rst
@@ -0,0 +1,10 @@
+compile-features-standard-logic-rework
+--------------------------------------
+
+* The :manual:`Compile Features <cmake-compile-features(7)>` functionality now
+ correctly disables or enables compiler extensions when no standard level is
+ specified and avoids unnecessarily adding language standard flags if the
+ requested settings match the compiler's defaults. See :policy:`CMP0128`.
+
+* :prop_tgt:`<LANG>_EXTENSIONS` is initialized to
+ :variable:`CMAKE_<LANG>_EXTENSIONS_DEFAULT`. See :policy:`CMP0128`.
diff --git a/Help/variable/CMAKE_CUDA_EXTENSIONS.rst b/Help/variable/CMAKE_CUDA_EXTENSIONS.rst
index b86c0ea..12749ce 100644
--- a/Help/variable/CMAKE_CUDA_EXTENSIONS.rst
+++ b/Help/variable/CMAKE_CUDA_EXTENSIONS.rst
@@ -3,11 +3,8 @@ CMAKE_CUDA_EXTENSIONS
.. versionadded:: 3.8
-Default value for :prop_tgt:`CUDA_EXTENSIONS` property of targets.
-
-This variable is used to initialize the :prop_tgt:`CUDA_EXTENSIONS`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`CUDA_EXTENSIONS` target property if set when a
+target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_CUDA_STANDARD.rst b/Help/variable/CMAKE_CUDA_STANDARD.rst
index 798ab1e..ee9395a 100644
--- a/Help/variable/CMAKE_CUDA_STANDARD.rst
+++ b/Help/variable/CMAKE_CUDA_STANDARD.rst
@@ -3,11 +3,8 @@ CMAKE_CUDA_STANDARD
.. versionadded:: 3.8
-Default value for :prop_tgt:`CUDA_STANDARD` property of targets.
-
-This variable is used to initialize the :prop_tgt:`CUDA_STANDARD`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`CUDA_STANDARD` target property if set when a
+target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_CUDA_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_CUDA_STANDARD_REQUIRED.rst
index ae2f52f..0c85a04d 100644
--- a/Help/variable/CMAKE_CUDA_STANDARD_REQUIRED.rst
+++ b/Help/variable/CMAKE_CUDA_STANDARD_REQUIRED.rst
@@ -3,11 +3,8 @@ CMAKE_CUDA_STANDARD_REQUIRED
.. versionadded:: 3.8
-Default value for :prop_tgt:`CUDA_STANDARD_REQUIRED` property of targets.
-
-This variable is used to initialize the :prop_tgt:`CUDA_STANDARD_REQUIRED`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`CUDA_STANDARD_REQUIRED` target property if set
+when a target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_CXX_EXTENSIONS.rst b/Help/variable/CMAKE_CXX_EXTENSIONS.rst
index ea8c4be..017f503 100644
--- a/Help/variable/CMAKE_CXX_EXTENSIONS.rst
+++ b/Help/variable/CMAKE_CXX_EXTENSIONS.rst
@@ -3,11 +3,8 @@ CMAKE_CXX_EXTENSIONS
.. versionadded:: 3.1
-Default value for :prop_tgt:`CXX_EXTENSIONS` property of targets.
-
-This variable is used to initialize the :prop_tgt:`CXX_EXTENSIONS`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`CXX_EXTENSIONS` target property if set when a
+target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_CXX_STANDARD.rst b/Help/variable/CMAKE_CXX_STANDARD.rst
index 8ef8c80..33eb89e 100644
--- a/Help/variable/CMAKE_CXX_STANDARD.rst
+++ b/Help/variable/CMAKE_CXX_STANDARD.rst
@@ -3,11 +3,8 @@ CMAKE_CXX_STANDARD
.. versionadded:: 3.1
-Default value for :prop_tgt:`CXX_STANDARD` property of targets.
-
-This variable is used to initialize the :prop_tgt:`CXX_STANDARD`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`CXX_STANDARD` target property if set when a target
+is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst
index f7b2ae9..1c6c0cc 100644
--- a/Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst
+++ b/Help/variable/CMAKE_CXX_STANDARD_REQUIRED.rst
@@ -3,11 +3,8 @@ CMAKE_CXX_STANDARD_REQUIRED
.. versionadded:: 3.1
-Default value for :prop_tgt:`CXX_STANDARD_REQUIRED` property of targets.
-
-This variable is used to initialize the :prop_tgt:`CXX_STANDARD_REQUIRED`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`CXX_STANDARD_REQUIRED` target property if set when
+a target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_C_EXTENSIONS.rst b/Help/variable/CMAKE_C_EXTENSIONS.rst
index fce8fc7..6680521 100644
--- a/Help/variable/CMAKE_C_EXTENSIONS.rst
+++ b/Help/variable/CMAKE_C_EXTENSIONS.rst
@@ -3,11 +3,8 @@ CMAKE_C_EXTENSIONS
.. versionadded:: 3.1
-Default value for :prop_tgt:`C_EXTENSIONS` property of targets.
-
-This variable is used to initialize the :prop_tgt:`C_EXTENSIONS`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`C_EXTENSIONS` target property if set when a target
+is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_C_STANDARD.rst b/Help/variable/CMAKE_C_STANDARD.rst
index 64ef8ce..ec1e513 100644
--- a/Help/variable/CMAKE_C_STANDARD.rst
+++ b/Help/variable/CMAKE_C_STANDARD.rst
@@ -3,11 +3,8 @@ CMAKE_C_STANDARD
.. versionadded:: 3.1
-Default value for :prop_tgt:`C_STANDARD` property of targets.
-
-This variable is used to initialize the :prop_tgt:`C_STANDARD`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`C_STANDARD` target property if set when a target
+is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_C_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_C_STANDARD_REQUIRED.rst
index e70b6bd..2bd9d51 100644
--- a/Help/variable/CMAKE_C_STANDARD_REQUIRED.rst
+++ b/Help/variable/CMAKE_C_STANDARD_REQUIRED.rst
@@ -3,11 +3,8 @@ CMAKE_C_STANDARD_REQUIRED
.. versionadded:: 3.1
-Default value for :prop_tgt:`C_STANDARD_REQUIRED` property of targets.
-
-This variable is used to initialize the :prop_tgt:`C_STANDARD_REQUIRED`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`C_STANDARD_REQUIRED` target property if set when
+a target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_HIP_EXTENSIONS.rst b/Help/variable/CMAKE_HIP_EXTENSIONS.rst
new file mode 100644
index 0000000..13987dc
--- /dev/null
+++ b/Help/variable/CMAKE_HIP_EXTENSIONS.rst
@@ -0,0 +1,10 @@
+CMAKE_HIP_EXTENSIONS
+--------------------
+
+.. versionadded:: 3.21
+
+Default value for :prop_tgt:`HIP_EXTENSIONS` target property if set when a
+target is created.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_HIP_STANDARD.rst b/Help/variable/CMAKE_HIP_STANDARD.rst
new file mode 100644
index 0000000..5f15145
--- /dev/null
+++ b/Help/variable/CMAKE_HIP_STANDARD.rst
@@ -0,0 +1,10 @@
+CMAKE_HIP_STANDARD
+------------------
+
+.. versionadded:: 3.21
+
+Default value for :prop_tgt:`HIP_STANDARD` target property if set when a target
+is created.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_HIP_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_HIP_STANDARD_REQUIRED.rst
new file mode 100644
index 0000000..5d35e4e
--- /dev/null
+++ b/Help/variable/CMAKE_HIP_STANDARD_REQUIRED.rst
@@ -0,0 +1,10 @@
+CMAKE_HIP_STANDARD_REQUIRED
+---------------------------
+
+.. versionadded:: 3.21
+
+Default value for :prop_tgt:`HIP_STANDARD_REQUIRED` target property if set when
+a target is created.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_LANG_EXTENSIONS.rst b/Help/variable/CMAKE_LANG_EXTENSIONS.rst
new file mode 100644
index 0000000..84e5e3a
--- /dev/null
+++ b/Help/variable/CMAKE_LANG_EXTENSIONS.rst
@@ -0,0 +1,19 @@
+CMAKE_<LANG>_EXTENSIONS
+-----------------------
+
+The variations are:
+
+* :variable:`CMAKE_C_EXTENSIONS`
+* :variable:`CMAKE_CXX_EXTENSIONS`
+* :variable:`CMAKE_CUDA_EXTENSIONS`
+* :variable:`CMAKE_HIP_EXTENSIONS`
+* :variable:`CMAKE_OBJC_EXTENSIONS`
+* :variable:`CMAKE_OBJCXX_EXTENSIONS`
+
+Default values for :prop_tgt:`<LANG>_EXTENSIONS` target properties if set when
+a target is created.
+
+For supported CMake versions see the respective pages.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_LANG_EXTENSIONS_DEFAULT.rst b/Help/variable/CMAKE_LANG_EXTENSIONS_DEFAULT.rst
new file mode 100644
index 0000000..6783eb5
--- /dev/null
+++ b/Help/variable/CMAKE_LANG_EXTENSIONS_DEFAULT.rst
@@ -0,0 +1,7 @@
+CMAKE_<LANG>_EXTENSIONS_DEFAULT
+-------------------------------
+
+.. versionadded:: 3.22
+
+Default value used when the :prop_tgt:`<LANG>_EXTENSIONS` target property is
+not set. Initialized during compiler detection to the compiler's default.
diff --git a/Help/variable/CMAKE_LANG_STANDARD.rst b/Help/variable/CMAKE_LANG_STANDARD.rst
new file mode 100644
index 0000000..0c41e19
--- /dev/null
+++ b/Help/variable/CMAKE_LANG_STANDARD.rst
@@ -0,0 +1,19 @@
+CMAKE_<LANG>_STANDARD
+---------------------
+
+The variations are:
+
+* :variable:`CMAKE_C_STANDARD`
+* :variable:`CMAKE_CXX_STANDARD`
+* :variable:`CMAKE_CUDA_STANDARD`
+* :variable:`CMAKE_HIP_STANDARD`
+* :variable:`CMAKE_OBJC_STANDARD`
+* :variable:`CMAKE_OBJCXX_STANDARD`
+
+Default values for :prop_tgt:`<LANG>_STANDARD` target properties if set when a
+target is created.
+
+For supported CMake versions see the respective pages.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_LANG_STANDARD_DEFAULT.rst b/Help/variable/CMAKE_LANG_STANDARD_DEFAULT.rst
new file mode 100644
index 0000000..eb63d20
--- /dev/null
+++ b/Help/variable/CMAKE_LANG_STANDARD_DEFAULT.rst
@@ -0,0 +1,7 @@
+CMAKE_<LANG>_STANDARD_DEFAULT
+-----------------------------
+
+.. versionadded:: 3.9
+
+The compiler's default standard for the language ``<LANG>``. Empty if the
+compiler has no conception of standard levels.
diff --git a/Help/variable/CMAKE_LANG_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_LANG_STANDARD_REQUIRED.rst
new file mode 100644
index 0000000..d7fa9b6
--- /dev/null
+++ b/Help/variable/CMAKE_LANG_STANDARD_REQUIRED.rst
@@ -0,0 +1,19 @@
+CMAKE_<LANG>_STANDARD_REQUIRED
+------------------------------
+
+The variations are:
+
+* :variable:`CMAKE_C_STANDARD_REQUIRED`
+* :variable:`CMAKE_CXX_STANDARD_REQUIRED`
+* :variable:`CMAKE_CUDA_STANDARD_REQUIRED`
+* :variable:`CMAKE_HIP_STANDARD_REQUIRED`
+* :variable:`CMAKE_OBJC_STANDARD_REQUIRED`
+* :variable:`CMAKE_OBJCXX_STANDARD_REQUIRED`
+
+Default values for :prop_tgt:`<LANG>_STANDARD_REQUIRED` target properties if
+set when a target is created.
+
+For supported CMake versions see the respective pages.
+
+See the :manual:`cmake-compile-features(7)` manual for information on
+compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJCXX_EXTENSIONS.rst b/Help/variable/CMAKE_OBJCXX_EXTENSIONS.rst
index b5225ea..46736aa 100644
--- a/Help/variable/CMAKE_OBJCXX_EXTENSIONS.rst
+++ b/Help/variable/CMAKE_OBJCXX_EXTENSIONS.rst
@@ -3,11 +3,8 @@ CMAKE_OBJCXX_EXTENSIONS
.. versionadded:: 3.16
-Default value for :prop_tgt:`OBJCXX_EXTENSIONS` property of targets.
-
-This variable is used to initialize the :prop_tgt:`OBJCXX_EXTENSIONS`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`OBJCXX_EXTENSIONS` target property if set when a
+target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJCXX_STANDARD.rst b/Help/variable/CMAKE_OBJCXX_STANDARD.rst
index 98e4624..0913382 100644
--- a/Help/variable/CMAKE_OBJCXX_STANDARD.rst
+++ b/Help/variable/CMAKE_OBJCXX_STANDARD.rst
@@ -3,11 +3,8 @@ CMAKE_OBJCXX_STANDARD
.. versionadded:: 3.16
-Default value for :prop_tgt:`OBJCXX_STANDARD` property of targets.
-
-This variable is used to initialize the :prop_tgt:`OBJCXX_STANDARD`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`OBJCXX_STANDARD` target property if set when a
+target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJCXX_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_OBJCXX_STANDARD_REQUIRED.rst
index 4b5e77c..9afc4ea 100644
--- a/Help/variable/CMAKE_OBJCXX_STANDARD_REQUIRED.rst
+++ b/Help/variable/CMAKE_OBJCXX_STANDARD_REQUIRED.rst
@@ -3,11 +3,8 @@ CMAKE_OBJCXX_STANDARD_REQUIRED
.. versionadded:: 3.16
-Default value for :prop_tgt:`OBJCXX_STANDARD_REQUIRED` property of targets.
-
-This variable is used to initialize the :prop_tgt:`OBJCXX_STANDARD_REQUIRED`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`OBJCXX_STANDARD_REQUIRED` target property if set
+when a target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJC_EXTENSIONS.rst b/Help/variable/CMAKE_OBJC_EXTENSIONS.rst
index d6e3c7d..9df11f1 100644
--- a/Help/variable/CMAKE_OBJC_EXTENSIONS.rst
+++ b/Help/variable/CMAKE_OBJC_EXTENSIONS.rst
@@ -3,11 +3,8 @@ CMAKE_OBJC_EXTENSIONS
.. versionadded:: 3.16
-Default value for :prop_tgt:`OBJC_EXTENSIONS` property of targets.
-
-This variable is used to initialize the :prop_tgt:`OBJC_EXTENSIONS`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`OBJC_EXTENSIONS` target property if set when a
+target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJC_STANDARD.rst b/Help/variable/CMAKE_OBJC_STANDARD.rst
index fde367d..0b9b63f 100644
--- a/Help/variable/CMAKE_OBJC_STANDARD.rst
+++ b/Help/variable/CMAKE_OBJC_STANDARD.rst
@@ -3,11 +3,8 @@ CMAKE_OBJC_STANDARD
.. versionadded:: 3.16
-Default value for :prop_tgt:`OBJC_STANDARD` property of targets.
-
-This variable is used to initialize the :prop_tgt:`OBJC_STANDARD`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`OBJC_STANDARD` target property if set when a
+target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_OBJC_STANDARD_REQUIRED.rst b/Help/variable/CMAKE_OBJC_STANDARD_REQUIRED.rst
index 8d26d95..c74db55 100644
--- a/Help/variable/CMAKE_OBJC_STANDARD_REQUIRED.rst
+++ b/Help/variable/CMAKE_OBJC_STANDARD_REQUIRED.rst
@@ -3,11 +3,8 @@ CMAKE_OBJC_STANDARD_REQUIRED
.. versionadded:: 3.16
-Default value for :prop_tgt:`OBJC_STANDARD_REQUIRED` property of targets.
-
-This variable is used to initialize the :prop_tgt:`OBJC_STANDARD_REQUIRED`
-property on all targets. See that target property for additional
-information.
+Default value for :prop_tgt:`OBJC_STANDARD_REQUIRED` target property if set
+when a target is created.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.
diff --git a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
index 11dd194..0231668 100644
--- a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
+++ b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
@@ -32,6 +32,8 @@ only for the policies that do not warn by default:
policy :policy:`CMP0116`.
* ``CMAKE_POLICY_WARNING_CMP0126`` controls the warning for
policy :policy:`CMP0126`.
+* ``CMAKE_POLICY_WARNING_CMP0128`` controls the warning for
+ policy :policy:`CMP0128`.
This variable should not be set by a project in CMake code. Project
developers running CMake may set this variable in their cache to