Pragma or gradle flag for ignoring deprecated warnings

They are deprecated because they are no longer recommended for use, won’t be as well maintained as non-deprecated equivalents, and could be removed in later years (although removal is unlikely for command-based v1 since it’s a vendordep now and is basically already separate).

With that said, try adding this if statement to your build.gradle:

model {
    components {
        frcUserProgram(NativeExecutableSpec) {
            binaries.all {
                if (!(toolChain instanceof VisualCpp))
                    cppCompiler.args << '-Wno-deprecated-declarations'
            }
        }
    }
}

Again, I strongly caution you against doing this.

1 Like