I’m using a new native plugins (cpp-library, cpp-application) without old software model.
My question is: how can I customize gcc compiler (from compat-gcc-44-c++ package) executable for them???
I don’t see any sample of customizing toolChain object - just selection other options based on the value of toolChain
UPDATE: managed to find this sample, but it does not work as exected:
application {
toolChains {
withType<Gcc> {
eachPlatform {
// this: GccPlatformToolChain
cppCompiler.setExecutable("compat-g++")
println("cppCompiler.executable: ${cppCompiler.executable}")
}
}
}
...
}
Effectively, cppCompiler executable is still “g++”.