Skip to content

Commit 642834d

Browse files
committed
Update the CLanguageStandard and CXXLanguageStandard enums
1 parent 4ab1f7c commit 642834d

File tree

1 file changed

+90
-30
lines changed

1 file changed

+90
-30
lines changed

Sources/PackageDescription/LanguageStandardSettings.swift

Lines changed: 90 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
This source file is part of the Swift.org open source project
33

4-
Copyright (c) 2018 Apple Inc. and the Swift project authors
4+
Copyright (c) 2017 - 2020 Apple Inc. and the Swift project authors
55
Licensed under Apache License v2.0 with Runtime Library Exception
66

77
See http://swift.org/LICENSE.txt for license information
@@ -10,66 +10,126 @@
1010

1111
/// The supported C language standard to use for compiling C sources in the package.
1212
public enum CLanguageStandard: String, Encodable {
13-
/// The identifier for the C89 language standard.
13+
14+
/// ISO C 1990.
1415
case c89
15-
/// The identifier for the C90 language standard.
16+
17+
/// ISO C 1990.
1618
case c90
17-
/// The identifier for the ISO 9899:1990 language standard.
19+
20+
/// ISO C 1990.
1821
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.
2227
case gnu89
23-
/// The identifier for the GNU90 language standard.
28+
29+
/// ISO C 1990 with GNU extensions.
2430
case gnu90
25-
/// The identifier for the C99 language standard.
31+
32+
/// ISO C 1999.
2633
case c99
27-
/// The identifier for the ISO 9899:1999 language standard.
34+
35+
/// ISO C 1999.
2836
case iso9899_1999 = "iso9899:1999"
29-
/// The identifier for the GNU99 language standard.
37+
38+
/// ISO C 1999 with GNU extensions.
3039
case gnu99
31-
/// The identifier for the C11 language standard.
40+
41+
/// ISO C 2011.
3242
case c11
33-
/// The identifier for the ISO 9899:2011 language standard.
43+
44+
/// ISO C 2011.
3445
case iso9899_2011 = "iso9899:2011"
35-
/// The identifier for the GNU11 language standard.
46+
47+
/// ISO C 2011 with GNU extensions.
3648
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
3781
}
3882

3983
/// The supported C++ language standards to use for compiling C++ sources in the package.
4084
public enum CXXLanguageStandard: String, Encodable {
41-
/// The identifier for the C++98 language standard.
85+
86+
/// ISO C++ 1998 with amendments.
4287
case cxx98 = "c++98"
43-
/// The identifier for the C++03 language standard.
88+
89+
/// ISO C++ 1998 with amendments.
4490
case cxx03 = "c++03"
45-
/// The identifier for the GNU++98 language standard.
91+
92+
/// ISO C++ 1998 with amendments and GNU extensions.
4693
case gnucxx98 = "gnu++98"
47-
/// The identifier for the GNU++03 language standard.
94+
95+
/// ISO C++ 1998 with amendments and GNU extensions.
4896
case gnucxx03 = "gnu++03"
49-
/// The identifier for the C++11 language standard.
97+
98+
/// ISO C++ 2011 with amendments.
5099
case cxx11 = "c++11"
51-
/// The identifier for the GNU++11 language standard.
100+
101+
/// ISO C++ 2011 with amendments and GNU extensions.
52102
case gnucxx11 = "gnu++11"
53-
/// The identifier for the C++14 language standard.
103+
104+
/// ISO C++ 2014 with amendments.
54105
case cxx14 = "c++14"
55-
/// The identifier for the GNU++14 language standard.
106+
107+
/// ISO C++ 2014 with amendments and GNU extensions.
56108
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")
58112
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")
60116
case gnucxx1z = "gnu++1z"
61-
/// The identifier for the C++17 language standard.
117+
118+
/// ISO C++ 2017 with amendments.
62119
@available(_PackageDescription, introduced: 999.0)
63120
case cxx17 = "c++17"
64-
/// The identifier for the GNU++17 language standard.
121+
122+
/// ISO C++ 2017 with amendments and GNU extensions.
65123
@available(_PackageDescription, introduced: 999.0)
66124
case gnucxx17 = "gnu++17"
67-
/// The identifier for the C++2a language standard.
125+
126+
/// ISO C++ 2020 DIS.
68127
@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.
71131
@available(_PackageDescription, introduced: 999.0)
72-
case gnucxx2a = "gnu++2a"
132+
case gnucxx20 = "gnu++20"
73133
}
74134

75135
#if !PACKAGE_DESCRIPTION_4

0 commit comments

Comments
 (0)