Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Re: How does CDT internal builder construct the command...

> Date: Tue, 13 Apr 2010 11:54:10 +0400
> From: Anna Dushistova <anna_dushistova@xxxxxxxxxx>
> Subject: [cdt-dev] How does CDT internal builder construct the command
>       line    and is there any way to change it?
> To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
> Message-ID: <C014C0AA-DA94-4FE3-8720-EFE9E4BFD66D@xxxxxxxxxx>
> Content-Type: text/plain; charset=us-ascii
>
> Hi All,
> I'm integrating a custom generic toolchain into CDT.
> I have makefile variables in the toolchain definition and all
> the customization goes through enviroment variables.
> Building project works fine, but not building "selected files".
> Apparently there is a different builder used for that and it
> doesn't work with my toolchain definition.
> Is there any way I can extend/overwrite/plug into the command
> line creation process in this case?
>


AFAIK

  org.eclipse.cdt.managedbuilder.internal.core.ManagedCommandLineGenerator
is used by the internal builder if the toolchain doesn't provide a command line generator.

The command structure is defined in the command line pattern that is optional given by the toolchain. If not, a default pattern is used.

You've two options to modify it

1) Change the command line pattern
        - in your project properties (tool settings) or
        - in the toolchain definition

2) Your toolchain can provide a custom command line generator that implements
  org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator

The tags in the plugin.xml are:
<plugin>
...
        <tool
                command="tool cmd"
        commandLineGenerator="yourCommandLineGeneratorClass"
        commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT} ${INPUTS}"
        ...
        </tool>
...
</plugin>


--Harald



Back to the top