Custom gcc executable

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
                println("cppCompiler.executable: ${cppCompiler.executable}")

Effectively, cppCompiler executable is still “g++”.

1 Like

Hi Iharh,

I have a similar problem. Did you find a solution?

Hell, Nicolas.
Actually - No. I decided to slowly upgrade the whole big project to the recent gcc instead of customizing gradle scripts.

1 Like