Skip to content

Commit 14e5274

Browse files
authored
Disable Werror=deprecated-declarations on GCC 10 (#172)
There are false positives in this case.
1 parent 657c2a1 commit 14e5274

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ targetCompatibility = 11
1212

1313
allprojects {
1414
group = "edu.wpi.first"
15-
version = "2024.3.0"
15+
version = "2024.3.1"
1616

1717
if (project.hasProperty('publishVersion')) {
1818
version = project.publishVersion

src/main/java/edu/wpi/first/nativeutils/WPINativeUtilsExtension.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public static class DefaultArguments {
6060
public final List<String> linuxCrossCompilerArgs = List.of("-std=c++20", "-Wformat=2", "-pedantic",
6161
"-Wno-psabi", "-Wno-unused-parameter", "-fPIC", "-pthread");
6262
public final List<String> linuxCrossCompilerExtraArgs11 = List.of("-Wno-error=deprecated-enum-enum-conversion");
63+
public final List<String> linuxCrossCompilerExtraArgs10 = List.of("-Wno-error=deprecated-declarations");
6364
public final List<String> linuxCrossCCompilerArgs = List.of("-Wformat=2", "-pedantic", "-Wno-psabi",
6465
"-Wno-unused-parameter", "-fPIC", "-pthread");
6566
public final List<String> linuxCrossLinkerArgs = List.of("-rdynamic", "-pthread", "-ldl", "-latomic");
@@ -116,6 +117,8 @@ public void addLinuxCrossArgs(PlatformConfig platform, int gccMajor) {
116117
platform.getCppCompiler().getArgs().addAll(defaultArguments.linuxCrossCompilerArgs);
117118
if (gccMajor >= 11) {
118119
platform.getCppCompiler().getArgs().addAll(defaultArguments.linuxCrossCompilerExtraArgs11);
120+
} else {
121+
platform.getCppCompiler().getArgs().addAll(defaultArguments.linuxCrossCompilerExtraArgs10);
119122
}
120123
platform.getcCompiler().getArgs().addAll(defaultArguments.linuxCrossCCompilerArgs);
121124
platform.getLinker().getArgs().addAll(defaultArguments.linuxCrossLinkerArgs);

testing/cpp/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import edu.wpi.first.toolchain.NativePlatforms
22

33
plugins {
44
id "cpp"
5-
id "edu.wpi.first.NativeUtils" version "2024.3.0"
5+
id "edu.wpi.first.NativeUtils" version "2024.3.1"
66
}
77

88
nativeUtils.addWpiNativeUtils()

0 commit comments

Comments
 (0)