Add properties and variables corresponding to CXX equivalents. Add features for c_function_prototypes (C90), c_restrict (C99), c_variadic_macros (C99) and c_static_assert (C11). This feature set can be extended later. Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader to conditionally represent the c_restrict feature.
25 lines
1.1 KiB
ReStructuredText
25 lines
1.1 KiB
ReStructuredText
target-language-features
|
|
------------------------
|
|
|
|
* New :prop_tgt:`CXX_STANDARD` and :prop_tgt:`CXX_EXTENSIONS` target
|
|
properties may specify values which CMake uses to compute required
|
|
compile options such as ``-std=c++11`` or ``-std=gnu++11``. The
|
|
:variable:`CMAKE_CXX_STANDARD` and :variable:`CMAKE_CXX_EXTENSIONS`
|
|
variables may be set to initialize the target properties.
|
|
|
|
* New :prop_tgt:`C_STANDARD` and :prop_tgt:`C_EXTENSIONS` target
|
|
properties may specify values which CMake uses to compute required
|
|
compile options such as ``-std=c11`` or ``-std=gnu11``. The
|
|
:variable:`CMAKE_C_STANDARD` and :variable:`CMAKE_C_EXTENSIONS`
|
|
variables may be set to initialize the target properties.
|
|
|
|
* New :prop_tgt:`COMPILE_FEATURES` target property may contain a list
|
|
of features required to compile a target. CMake uses this
|
|
information to ensure that the compiler in use is capable of building
|
|
the target, and to add any necessary compile flags to support language
|
|
features.
|
|
|
|
* New :command:`target_compile_features` command allows populating the
|
|
:prop_tgt:`COMPILE_FEATURES` target property, just like any other
|
|
build variable.
|