mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 14:19:59 -05:00
Merge topic 'help_cmake_lang_extensions_default'
e9976c8827 Help: Better explain CMAKE_<LANG>_EXTENSIONS_DEFAULT
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6686
This commit is contained in:
@@ -119,9 +119,9 @@ Availability of Compiler Extensions
|
||||
-----------------------------------
|
||||
|
||||
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.
|
||||
default (see :variable:`CMAKE_<LANG>_EXTENSIONS_DEFAULT`). Note that because
|
||||
most compilers enable extensions by default, this may expose portability bugs
|
||||
in user code or in the headers of third-party dependencies.
|
||||
|
||||
:prop_tgt:`<LANG>_EXTENSIONS` used to default to ``ON``. See :policy:`CMP0128`.
|
||||
|
||||
|
||||
@@ -15,5 +15,7 @@ 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_CUDA_EXTENSIONS` variable if it is set when a target
|
||||
is created.
|
||||
the :variable:`CMAKE_CUDA_EXTENSIONS` variable if set when a target is created
|
||||
and otherwise by the value of
|
||||
:variable:`CMAKE_CUDA_EXTENSIONS_DEFAULT <CMAKE_<LANG>_EXTENSIONS_DEFAULT>`
|
||||
(see :policy:`CMP0128`).
|
||||
|
||||
@@ -15,5 +15,7 @@ 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_CXX_EXTENSIONS` variable if it is set when a target
|
||||
is created.
|
||||
the :variable:`CMAKE_CXX_EXTENSIONS` variable if set when a target is created
|
||||
and otherwise by the value of
|
||||
:variable:`CMAKE_CXX_EXTENSIONS_DEFAULT <CMAKE_<LANG>_EXTENSIONS_DEFAULT>` (see
|
||||
:policy:`CMP0128`).
|
||||
|
||||
@@ -15,5 +15,7 @@ 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_C_EXTENSIONS` variable if it is set when a target
|
||||
is created.
|
||||
the :variable:`CMAKE_C_EXTENSIONS` variable if set when a target is created and
|
||||
otherwise by the value of
|
||||
:variable:`CMAKE_C_EXTENSIONS_DEFAULT <CMAKE_<LANG>_EXTENSIONS_DEFAULT>` (see
|
||||
:policy:`CMP0128`).
|
||||
|
||||
@@ -15,5 +15,7 @@ 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.
|
||||
the :variable:`CMAKE_HIP_EXTENSIONS` variable if set when a target is created
|
||||
and otherwise by the value of
|
||||
:variable:`CMAKE_HIP_EXTENSIONS_DEFAULT <CMAKE_<LANG>_EXTENSIONS_DEFAULT>` (see
|
||||
:policy:`CMP0128`).
|
||||
|
||||
@@ -14,7 +14,8 @@ 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.
|
||||
created and otherwise by the value of
|
||||
:variable:`CMAKE_<LANG>_EXTENSIONS_DEFAULT` (see :policy:`CMP0128`).
|
||||
|
||||
For supported CMake versions see the respective pages.
|
||||
To control language standard versions see :prop_tgt:`<LANG>_STANDARD`.
|
||||
|
||||
@@ -18,5 +18,7 @@ If the property is not set, and the project has set the :prop_tgt:`CXX_EXTENSION
|
||||
the value of :prop_tgt:`CXX_EXTENSIONS` is set for :prop_tgt:`OBJCXX_EXTENSIONS`.
|
||||
|
||||
This property is initialized by the value of
|
||||
the :variable:`CMAKE_OBJCXX_EXTENSIONS` variable if it is set when a target
|
||||
is created.
|
||||
the :variable:`CMAKE_OBJCXX_EXTENSIONS` variable if set when a target is
|
||||
created and otherwise by the value of
|
||||
:variable:`CMAKE_OBJCXX_EXTENSIONS_DEFAULT <CMAKE_<LANG>_EXTENSIONS_DEFAULT>`
|
||||
(see :policy:`CMP0128`).
|
||||
|
||||
@@ -18,5 +18,7 @@ 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_OBJC_EXTENSIONS` variable if it is set when a target
|
||||
is created.
|
||||
the :variable:`CMAKE_OBJC_EXTENSIONS` variable if set when a target is created
|
||||
and otherwise by the value of
|
||||
:variable:`CMAKE_OBJC_EXTENSIONS_DEFAULT <CMAKE_<LANG>_EXTENSIONS_DEFAULT>`
|
||||
(see :policy:`CMP0128`).
|
||||
|
||||
@@ -11,7 +11,8 @@ The variations are:
|
||||
* :variable:`CMAKE_OBJCXX_EXTENSIONS`
|
||||
|
||||
Default values for :prop_tgt:`<LANG>_EXTENSIONS` target properties if set when
|
||||
a target is created.
|
||||
a target is created. For the compiler's default setting see
|
||||
:variable:`CMAKE_<LANG>_EXTENSIONS_DEFAULT`.
|
||||
|
||||
For supported CMake versions see the respective pages.
|
||||
|
||||
|
||||
@@ -3,5 +3,8 @@ 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.
|
||||
Compiler's default extensions mode. Used as the default for the
|
||||
:prop_tgt:`<LANG>_EXTENSIONS` target property when
|
||||
:variable:`CMAKE_<LANG>_EXTENSIONS` is not set (see :policy:`CMP0128`).
|
||||
|
||||
This variable is read-only. Modifying it is undefined behavior.
|
||||
|
||||
Reference in New Issue
Block a user