By experiments (rather than fully understanding the underlying mechanism,) I learned
cppCompiler {
args '-pthread'
}
and
cppCompiler.args '-pthread'
were interchangeable. But to my surprise,
linker.args '-pthread'
and
linker {
args '-pthread'
}
were not; the latter yielded an error:
* What went wrong:
A problem occurred configuring root project 'svn.maggott'.
> The following model rules could not be applied due to unbound inputs and/or subjects:
model.components > create(timer) > org.gradle.platform.base.internal.DefaultComponentSpecIdentifier@6940e4b.getBinaries() > named(linker)
subject:
- components.timer.binaries.linker BinarySpec [*]
[*] - indicates that a model item could not be found for the path or type.
Which part of the Gradle DSL Reference should I consult for relevant properties? Also, other pointers I’ve found so far:
https://docs.gradle.org/current/userguide/writing_build_scripts.html