In Gradle 1.10 Release notes http://www.gradle.org/docs/current/release-notes I see C++ build mentioned.
How to set up C++ project to build with gradle?
put this in build.gradle
apply plugin: 'cpp'
executables {
hello {}
}
put your source file in src/hello/cpp/say_hello.cpp
run 'gradle helloExecutable'
your executable should be built to build/binaries/helloExecutable/hello
Or, if you want your source in src/foo/bar then add
sources {
hello {
cpp {
source {
srcDir "src/foo/bar"
}
}
}