0c767c629d60a208dc9194bb47e1e1eaf7c11b90
[platform/upstream/cmake.git] / Help / prop_tgt / HIP_STANDARD.rst
1 HIP_STANDARD
2 ------------
3
4 .. versionadded:: 3.21
5
6 The HIP/C++ standard requested to build this target.
7
8 Supported values are:
9
10 ``98``
11   HIP C++98
12
13 ``11``
14   HIP C++11
15
16 ``14``
17   HIP C++14
18
19 ``17``
20   HIP C++17
21
22 ``20``
23   HIP C++20
24
25 ``23``
26   HIP C++23
27
28 If the value requested does not result in a compile flag being added for
29 the compiler in use, a previous standard flag will be added instead.  This
30 means that using:
31
32 .. code-block:: cmake
33
34   set_property(TARGET tgt PROPERTY HIP_STANDARD 11)
35
36 with a compiler which does not support ``-std=gnu++11`` or an equivalent
37 flag will not result in an error or warning, but will instead add the
38 ``-std=gnu++98`` flag if supported.  This "decay" behavior may be controlled
39 with the :prop_tgt:`HIP_STANDARD_REQUIRED` target property.
40 Additionally, the :prop_tgt:`HIP_EXTENSIONS` target property may be used to
41 control whether compiler-specific extensions are enabled on a per-target basis.
42
43 See the :manual:`cmake-compile-features(7)` manual for information on
44 compile features and a list of supported compilers.
45
46 This property is initialized by the value of
47 the :variable:`CMAKE_HIP_STANDARD` variable if it is set when a target
48 is created.