gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
91 stars 8 forks source link

c++ cmake-library passing build arguments #1057

Open HarrisDePerceptron opened 4 years ago

HarrisDePerceptron commented 4 years ago

Pass build arguments to cmake

Expected Behavior

cmake {
...
arguments.set(listOf("-DBUILD_WHATEVER=< value >", "-DBUILD_WHATEVER2=< value >"))
}

should be able to pass build arguments. something similar to this

Current Behavior

Script compilation error:

Line 21: arguments.set(listOf("-DWITH_GSTREAMER=ON", "-DBUILD_EXAMPLES=OFF")) ^ Unresolved reference: arguments

1 error

Context

Need to pass arguments for various build options

Steps to Reproduce (for bugs)

cmake {
...
arguments.set(listOf("-DBUILD_WHATEVER=< value >", "-DBUILD_WHATEVER2=< value >"))
}

Your Environment