cmake/Help/prop_tgt/LANG_EXTENSIONS.rst
Raul Tambre e9976c8827 Help: Better explain CMAKE_<LANG>_EXTENSIONS_DEFAULT
Explain that this represents the compiler's default and mustn't be modified
by the user. Clarify when it's used as the default.

Additionally:
* Add a reference to it in cmake-compile-features in text explaining the
  feature.
* Add explanations for the default initialization by
  `CMAKE_<LANG>_EXTENSIONS_DEFAULT` to all `<LANG>_EXTENSIONS` pages and
  references to CMP0128.
* Slightly reduce the wordiness of the default initialization explanations by
  removing an unnecessary "it is".

Fixes #22828.
2021-11-02 17:58:21 +02:00

25 lines
799 B
ReStructuredText

<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 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`.
See the :manual:`cmake-compile-features(7)` manual for information on
compile features and a list of supported compilers.