wpilibsuite / native-utils

Gradle utility plugin for compiling native libraries
Other
4 stars 21 forks source link

`Could not get unknown property 'args' for object of type edu.wpi.first.nativeutils.platforms.DefaultPlatformConfig` #203

Closed qwertychouskie closed 2 months ago

qwertychouskie commented 2 months ago

Trying to make the build not use -Werror:

nativeUtils {
  platformConfigs {
    cppCompiler {
      // Args for debug and release
      args << "-Wno-error"
      // Args for debug
      debugArgs << ""
      // Args for release
      releaseArgs << ""
    }
  }
  exportsConfigs {
    CANBridge {
    }
  }
}

I get this error:

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/[user]/unofficial-rev-port/CANBridge/build.gradle' line: 34

* What went wrong:
A problem occurred evaluating root project 'CANBridge'.
> Could not get unknown property 'args' for object of type edu.wpi.first.nativeutils.platforms.DefaultPlatformConfig.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 233ms
qwertychouskie commented 2 months ago

Whoops, nativeUtils.wpi.addWarningsAsErrors() was present, removed that and no issues.