cmake/Help/prop_gbl/CMAKE_C_KNOWN_FEATURES.rst

58 lines
1.4 KiB
ReStructuredText
Raw Normal View History

2015-04-27 22:25:09 +02:00
CMAKE_C_KNOWN_FEATURES
----------------------
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.1
2015-04-27 22:25:09 +02:00
List of C features known to this version of CMake.
The features listed in this global property may be known to be available to the
C compiler. If the feature is available with the C compiler, it will
be listed in the :variable:`CMAKE_C_COMPILE_FEATURES` variable.
The features listed here may be used with the :command:`target_compile_features`
command. See the :manual:`cmake-compile-features(7)` manual for information on
2015-08-17 11:37:30 +02:00
compile features and a list of supported compilers.
2015-04-27 22:25:09 +02:00
2021-11-20 13:41:27 +01:00
The features known to this version of CMake are listed below.
High level meta features indicating C standard support
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 3.8
2015-04-27 22:25:09 +02:00
2017-04-14 19:02:05 +02:00
``c_std_90``
2020-02-01 23:06:01 +01:00
Compiler mode is at least C 90.
2017-04-14 19:02:05 +02:00
``c_std_99``
2020-02-01 23:06:01 +01:00
Compiler mode is at least C 99.
2017-04-14 19:02:05 +02:00
``c_std_11``
2020-02-01 23:06:01 +01:00
Compiler mode is at least C 11.
2017-04-14 19:02:05 +02:00
2021-09-14 00:13:48 +02:00
``c_std_17``
2021-11-20 13:41:27 +01:00
.. versionadded:: 3.21
2021-09-14 00:13:48 +02:00
Compiler mode is at least C 17.
``c_std_23``
2021-11-20 13:41:27 +01:00
.. versionadded:: 3.21
2021-09-14 00:13:48 +02:00
Compiler mode is at least C 23.
2022-03-29 21:10:50 +02:00
.. include:: CMAKE_LANG_STD_FLAGS.txt
2021-11-20 13:41:27 +01:00
Low level individual compile features
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015-04-27 22:25:09 +02:00
``c_function_prototypes``
Function prototypes, as defined in ``ISO/IEC 9899:1990``.
``c_restrict``
``restrict`` keyword, as defined in ``ISO/IEC 9899:1999``.
``c_static_assert``
Static assert, as defined in ``ISO/IEC 9899:2011``.
``c_variadic_macros``
Variadic macros, as defined in ``ISO/IEC 9899:1999``.