Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit d78c4fa

Browse files
committed
[packages] Fixes #317. Added all missing current C++ standards to C.Cxx.ELanguageStandards enumeration. Added are Cxx03, GnuCxx03, GnuCxx11, Cxx14, GnuCxx14.
1 parent 7b64a21 commit d78c4fa

File tree

6 files changed

+113
-4
lines changed

6 files changed

+113
-4
lines changed

Changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
15-Apr-2017 Fixes #317. Added all missing current C++ standards to C.Cxx.ELanguageStandards enumeration. Added are Cxx03, GnuCxx03, GnuCxx11, Cxx14, GnuCxx14.
2+
13
07-Apr-2017 ======== Version 1.1.0 ========
24

35
07-Apr-2017 Fixes #315. Switch tests on macOS to use Clang-Xcode8 by default.

packages/C/bam/Scripts/Enumerations/CxxCompilerOptionEnums.cs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,35 @@ public enum ELanguageStandard
7676
/// </summary>
7777
GnuCxx98,
7878

79+
/// <summary>
80+
/// Compile against the C++ 03 amendments.
81+
/// </summary>
82+
Cxx03,
83+
84+
/// <summary>
85+
/// Compile against the GNU C++ 03 amendments.
86+
/// </summary>
87+
GnuCxx03,
88+
7989
/// <summary>
8090
/// Compile against the C++11 standard.
8191
/// </summary>
8292
Cxx11,
83-
// TODO: GnuCxx11
93+
94+
/// <summary>
95+
/// Compile against the GNU C++ 11 standard.
96+
/// </summary>
97+
GnuCxx11,
98+
99+
/// <summary>
100+
/// Compile against the C++ 14 standard.
101+
/// </summary>
102+
Cxx14,
103+
104+
/// <summary>
105+
/// Compile against the GNU C++ 14 standard.
106+
/// </summary>
107+
GnuCxx14,
84108
}
85109

86110
/// <summary>

packages/ClangCommon/bam/Scripts/CompilerSettings/CommandLine/C/ICxxOnlyCompilerSettings.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,30 @@ public static void
7676
commandLine.Add("-std=gnu++98");
7777
break;
7878

79+
case C.Cxx.ELanguageStandard.Cxx03:
80+
commandLine.Add("-std=c++03");
81+
break;
82+
83+
case C.Cxx.ELanguageStandard.GnuCxx03:
84+
commandLine.Add("-std=gnu++03");
85+
break;
86+
7987
case C.Cxx.ELanguageStandard.Cxx11:
8088
commandLine.Add("-std=c++11");
8189
break;
90+
91+
case C.Cxx.ELanguageStandard.GnuCxx11:
92+
commandLine.Add("-std=gnu++11");
93+
break;
94+
95+
case C.Cxx.ELanguageStandard.Cxx14:
96+
commandLine.Add("-std=c++14");
97+
break;
98+
99+
case C.Cxx.ELanguageStandard.GnuCxx14:
100+
commandLine.Add("-std=gnu++14");
101+
break;
102+
82103
default:
83104
throw new Bam.Core.Exception("Invalid C++ language standard, {0}", settings.LanguageStandard.Value.ToString());
84105
}

packages/ClangCommon/bam/Scripts/CompilerSettings/Xcode/C/ICxxOnlyCompilerSettings.cs

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,45 @@ public static void
6060
}
6161
if (settings.LanguageStandard.HasValue)
6262
{
63+
XcodeBuilder.UniqueConfigurationValue standard = null;
6364
switch (settings.LanguageStandard.Value)
6465
{
6566
case C.Cxx.ELanguageStandard.Cxx98:
66-
configuration["CLANG_CXX_LANGUAGE_STANDARD"] = new XcodeBuilder.UniqueConfigurationValue("c++98");
67+
standard = new XcodeBuilder.UniqueConfigurationValue("c++98");
6768
break;
6869

6970
case C.Cxx.ELanguageStandard.GnuCxx98:
70-
configuration["CLANG_CXX_LANGUAGE_STANDARD"] = new XcodeBuilder.UniqueConfigurationValue("gnu++98");
71+
standard = new XcodeBuilder.UniqueConfigurationValue("gnu++98");
72+
break;
73+
74+
case C.Cxx.ELanguageStandard.Cxx03:
75+
standard = new XcodeBuilder.UniqueConfigurationValue("c++03");
76+
break;
77+
78+
case C.Cxx.ELanguageStandard.GnuCxx03:
79+
standard = new XcodeBuilder.UniqueConfigurationValue("gnu++03");
7180
break;
7281

7382
case C.Cxx.ELanguageStandard.Cxx11:
74-
configuration["CLANG_CXX_LANGUAGE_STANDARD"] = new XcodeBuilder.UniqueConfigurationValue("c++11");
83+
standard = new XcodeBuilder.UniqueConfigurationValue("c++11");
84+
break;
85+
86+
case C.Cxx.ELanguageStandard.GnuCxx11:
87+
standard = new XcodeBuilder.UniqueConfigurationValue("gnu++11");
88+
break;
89+
90+
case C.Cxx.ELanguageStandard.Cxx14:
91+
standard = new XcodeBuilder.UniqueConfigurationValue("c++14");
92+
break;
93+
94+
case C.Cxx.ELanguageStandard.GnuCxx14:
95+
standard = new XcodeBuilder.UniqueConfigurationValue("gnu++14");
7596
break;
7697

7798
default:
7899
throw new Bam.Core.Exception("Invalid C++ language standard, {0}", settings.LanguageStandard.Value.ToString());
79100
}
101+
configuration["CLANG_CXX_LANGUAGE_STANDARD"] = standard;
80102
}
81103
if (settings.StandardLibrary.HasValue)
82104
{

packages/GccCommon/bam/Scripts/CompilerSettings/CommandLine/C/ICxxOnlyCompilerSettings.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,30 @@ public static void
7676
commandLine.Add("-std=gnu++98");
7777
break;
7878

79+
case C.Cxx.ELanguageStandard.Cxx03:
80+
commandLine.Add("-std=c++03");
81+
break;
82+
83+
case C.Cxx.ELanguageStandard.GnuCxx03:
84+
commandLine.Add("-std=gnu++03");
85+
break;
86+
7987
case C.Cxx.ELanguageStandard.Cxx11:
8088
commandLine.Add("-std=c++11");
8189
break;
8290

91+
case C.Cxx.ELanguageStandard.GnuCxx11:
92+
commandLine.Add("-std=gnu++11");
93+
break;
94+
95+
case C.Cxx.ELanguageStandard.Cxx14:
96+
commandLine.Add("-std=c++14");
97+
break;
98+
99+
case C.Cxx.ELanguageStandard.GnuCxx14:
100+
commandLine.Add("-std=gnu++14");
101+
break;
102+
83103
default:
84104
throw new Bam.Core.Exception("Invalid C++ language standard, '{0}'", settings.LanguageStandard.Value.ToString());
85105
}

packages/MingwCommon/bam/Scripts/CompilerSettings/CommandLine/C/ICxxOnlyCompilerSettings.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,30 @@ public static void
7676
commandLine.Add("-std=gnu++98");
7777
break;
7878

79+
case C.Cxx.ELanguageStandard.Cxx03:
80+
commandLine.Add("-std=c++03");
81+
break;
82+
83+
case C.Cxx.ELanguageStandard.GnuCxx03:
84+
commandLine.Add("-std=gnu++03");
85+
break;
86+
7987
case C.Cxx.ELanguageStandard.Cxx11:
8088
commandLine.Add("-std=c++11");
8189
break;
8290

91+
case C.Cxx.ELanguageStandard.GnuCxx11:
92+
commandLine.Add("-std=gnu++11");
93+
break;
94+
95+
case C.Cxx.ELanguageStandard.Cxx14:
96+
commandLine.Add("-std=c++14");
97+
break;
98+
99+
case C.Cxx.ELanguageStandard.GnuCxx14:
100+
commandLine.Add("-std=gnu++14");
101+
break;
102+
83103
default:
84104
throw new Bam.Core.Exception("Invalid C++ language standard, {0}", settings.LanguageStandard.Value.ToString());
85105
}

0 commit comments

Comments
 (0)