CMAKE_C_KNOWN_FEATURES.rst 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. CMAKE_C_KNOWN_FEATURES
  2. ----------------------
  3. .. versionadded:: 3.1
  4. List of C features known to this version of CMake.
  5. The features listed in this global property may be known to be available to the
  6. C compiler. If the feature is available with the C compiler, it will
  7. be listed in the :variable:`CMAKE_C_COMPILE_FEATURES` variable.
  8. The features listed here may be used with the :command:`target_compile_features`
  9. command. See the :manual:`cmake-compile-features(7)` manual for information on
  10. compile features and a list of supported compilers.
  11. The features known to this version of CMake are listed below.
  12. High level meta features indicating C standard support
  13. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  14. .. versionadded:: 3.8
  15. ``c_std_90``
  16. Compiler mode is at least C 90.
  17. ``c_std_99``
  18. Compiler mode is at least C 99.
  19. ``c_std_11``
  20. Compiler mode is at least C 11.
  21. ``c_std_17``
  22. .. versionadded:: 3.21
  23. Compiler mode is at least C 17.
  24. ``c_std_23``
  25. .. versionadded:: 3.21
  26. Compiler mode is at least C 23.
  27. .. include:: CMAKE_LANG_STD_FLAGS.txt
  28. Low level individual compile features
  29. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  30. ``c_function_prototypes``
  31. Function prototypes, as defined in ``ISO/IEC 9899:1990``.
  32. ``c_restrict``
  33. ``restrict`` keyword, as defined in ``ISO/IEC 9899:1999``.
  34. ``c_static_assert``
  35. Static assert, as defined in ``ISO/IEC 9899:2011``.
  36. ``c_variadic_macros``
  37. Variadic macros, as defined in ``ISO/IEC 9899:1999``.