|
1 | 1 | /*
|
2 | 2 | This source file is part of the Swift.org open source project
|
3 | 3 |
|
4 |
| - Copyright (c) 2018 Apple Inc. and the Swift project authors |
| 4 | + Copyright (c) 2017 - 2020 Apple Inc. and the Swift project authors |
5 | 5 | Licensed under Apache License v2.0 with Runtime Library Exception
|
6 | 6 |
|
7 | 7 | See http://swift.org/LICENSE.txt for license information
|
|
10 | 10 |
|
11 | 11 | /// The supported C language standard to use for compiling C sources in the package.
|
12 | 12 | public enum CLanguageStandard: String, Encodable {
|
13 |
| - /// The identifier for the C89 language standard. |
| 13 | + |
| 14 | + /// ISO C 1990. |
14 | 15 | case c89
|
15 |
| - /// The identifier for the C90 language standard. |
| 16 | + |
| 17 | + /// ISO C 1990. |
16 | 18 | case c90
|
17 |
| - /// The identifier for the ISO 9899:1990 language standard. |
| 19 | + |
| 20 | + /// ISO C 1990. |
18 | 21 | case iso9899_1990 = "iso9899:1990"
|
19 |
| - /// The identifier for the ISO 9899:1994 language standard. |
20 |
| - case iso9899_199409 = "iso9899:1994" |
21 |
| - /// The identifier for the GNU89 language standard. |
| 22 | + |
| 23 | + /// ISO C 1990 with amendment 1. |
| 24 | + case iso9899_199409 = "iso9899:199409" |
| 25 | + |
| 26 | + /// ISO C 1990 with GNU extensions. |
22 | 27 | case gnu89
|
23 |
| - /// The identifier for the GNU90 language standard. |
| 28 | + |
| 29 | + /// ISO C 1990 with GNU extensions. |
24 | 30 | case gnu90
|
25 |
| - /// The identifier for the C99 language standard. |
| 31 | + |
| 32 | + /// ISO C 1999. |
26 | 33 | case c99
|
27 |
| - /// The identifier for the ISO 9899:1999 language standard. |
| 34 | + |
| 35 | + /// ISO C 1999. |
28 | 36 | case iso9899_1999 = "iso9899:1999"
|
29 |
| - /// The identifier for the GNU99 language standard. |
| 37 | + |
| 38 | + /// ISO C 1999 with GNU extensions. |
30 | 39 | case gnu99
|
31 |
| - /// The identifier for the C11 language standard. |
| 40 | + |
| 41 | + /// ISO C 2011. |
32 | 42 | case c11
|
33 |
| - /// The identifier for the ISO 9899:2011 language standard. |
| 43 | + |
| 44 | + /// ISO C 2011. |
34 | 45 | case iso9899_2011 = "iso9899:2011"
|
35 |
| - /// The identifier for the GNU11 language standard. |
| 46 | + |
| 47 | + /// ISO C 2011 with GNU extensions. |
36 | 48 | case gnu11
|
| 49 | + |
| 50 | + /// ISO C 2017. |
| 51 | + @available(_PackageDescription, introduced: 999.0) |
| 52 | + case c17 |
| 53 | + |
| 54 | + /// ISO C 2017. |
| 55 | + @available(_PackageDescription, introduced: 999.0) |
| 56 | + case iso9899_2017 = "iso9899:2017" |
| 57 | + |
| 58 | + /// ISO C 2017. |
| 59 | + @available(_PackageDescription, introduced: 999.0) |
| 60 | + case c18 |
| 61 | + |
| 62 | + /// ISO C 2017. |
| 63 | + @available(_PackageDescription, introduced: 999.0) |
| 64 | + case iso9899_2018 = "iso9899:2018" |
| 65 | + |
| 66 | + /// ISO C 2017 with GNU extensions. |
| 67 | + @available(_PackageDescription, introduced: 999.0) |
| 68 | + case gnu17 |
| 69 | + |
| 70 | + /// ISO C 2017 with GNU extensions. |
| 71 | + @available(_PackageDescription, introduced: 999.0) |
| 72 | + case gnu18 |
| 73 | + |
| 74 | + /// Working Draft for ISO C2x. |
| 75 | + @available(_PackageDescription, introduced: 999.0) |
| 76 | + case c2x |
| 77 | + |
| 78 | + /// Working Draft for ISO C2x with GNU extensions. |
| 79 | + @available(_PackageDescription, introduced: 999.0) |
| 80 | + case gnu2x |
37 | 81 | }
|
38 | 82 |
|
39 | 83 | /// The supported C++ language standards to use for compiling C++ sources in the package.
|
40 | 84 | public enum CXXLanguageStandard: String, Encodable {
|
41 |
| - /// The identifier for the C++98 language standard. |
| 85 | + |
| 86 | + /// ISO C++ 1998 with amendments. |
42 | 87 | case cxx98 = "c++98"
|
43 |
| - /// The identifier for the C++03 language standard. |
| 88 | + |
| 89 | + /// ISO C++ 1998 with amendments. |
44 | 90 | case cxx03 = "c++03"
|
45 |
| - /// The identifier for the GNU++98 language standard. |
| 91 | + |
| 92 | + /// ISO C++ 1998 with amendments and GNU extensions. |
46 | 93 | case gnucxx98 = "gnu++98"
|
47 |
| - /// The identifier for the GNU++03 language standard. |
| 94 | + |
| 95 | + /// ISO C++ 1998 with amendments and GNU extensions. |
48 | 96 | case gnucxx03 = "gnu++03"
|
49 |
| - /// The identifier for the C++11 language standard. |
| 97 | + |
| 98 | + /// ISO C++ 2011 with amendments. |
50 | 99 | case cxx11 = "c++11"
|
51 |
| - /// The identifier for the GNU++11 language standard. |
| 100 | + |
| 101 | + /// ISO C++ 2011 with amendments and GNU extensions. |
52 | 102 | case gnucxx11 = "gnu++11"
|
53 |
| - /// The identifier for the C++14 language standard. |
| 103 | + |
| 104 | + /// ISO C++ 2014 with amendments. |
54 | 105 | case cxx14 = "c++14"
|
55 |
| - /// The identifier for the GNU++14 language standard. |
| 106 | + |
| 107 | + /// ISO C++ 2014 with amendments and GNU extensions. |
56 | 108 | case gnucxx14 = "gnu++14"
|
57 |
| - /// The identifier for the C++1z language standard. |
| 109 | + |
| 110 | + /// ISO C++ 2017 with amendments. |
| 111 | + @available(_PackageDescription, introduced: 4, deprecated: 999.0, renamed: "cxx17") |
58 | 112 | case cxx1z = "c++1z"
|
59 |
| - /// The identifier for the GNU++1z language standard. |
| 113 | + |
| 114 | + /// ISO C++ 2017 with amendments and GNU extensions. |
| 115 | + @available(_PackageDescription, introduced: 4, deprecated: 999.0, renamed: "gnucxx17") |
60 | 116 | case gnucxx1z = "gnu++1z"
|
61 |
| - /// The identifier for the C++17 language standard. |
| 117 | + |
| 118 | + /// ISO C++ 2017 with amendments. |
62 | 119 | @available(_PackageDescription, introduced: 999.0)
|
63 | 120 | case cxx17 = "c++17"
|
64 |
| - /// The identifier for the GNU++17 language standard. |
| 121 | + |
| 122 | + /// ISO C++ 2017 with amendments and GNU extensions. |
65 | 123 | @available(_PackageDescription, introduced: 999.0)
|
66 | 124 | case gnucxx17 = "gnu++17"
|
67 |
| - /// The identifier for the C++2a language standard. |
| 125 | + |
| 126 | + /// ISO C++ 2020 DIS. |
68 | 127 | @available(_PackageDescription, introduced: 999.0)
|
69 |
| - case cxx2a = "c++2a" |
70 |
| - /// The identifier for the GNU++2a language standard. |
| 128 | + case cxx20 = "c++20" |
| 129 | + |
| 130 | + /// ISO C++ 2020 DIS with GNU extensions. |
71 | 131 | @available(_PackageDescription, introduced: 999.0)
|
72 |
| - case gnucxx2a = "gnu++2a" |
| 132 | + case gnucxx20 = "gnu++20" |
73 | 133 | }
|
74 | 134 |
|
75 | 135 | #if !PACKAGE_DESCRIPTION_4
|
|
0 commit comments