Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Plugin - changing discovery default compiler command
Plugin - changing discovery default compiler command [message #220571] Sun, 27 July 2008 11:52 Go to next message
Eclipse UserFriend
Originally posted by: lfx.dsv.agh.edu.pl

Hello

I'm writing a custom toolchain plugin to CDT and I have a problem with
changing discovery compiler invocation command (default gcc).

I tried to follow steps from
http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg07563.html but it doesn't
work for me. I don't quite understand what 'our toolset' mean, and if it
refers to plugin I'm developing or some another plugin.

Anyway, I extended
org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfi le with custom
run command and gave it my unique id. Then, in the same plugin, I created
an extension to org.eclipse.cdt.managedbuilder.core.buildDefinitions with
necessary projectTypes, configurations etc. I also created a compiler tool
with inputType scannerConfigDiscoveryProfileId value set to scanner
configuration I created before.
But it has no effect: discovery profiles are the same and compiler
invocation command is still gcc (or g++ for C++).

Can anybody give me a clue how to get this stuff work?
Thanks
Re: Plugin - changing discovery default compiler command [message #220645 is a reply to message #220571] Mon, 28 July 2008 10:59 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.kichwacoders.com

"lfx" <lfx@dsv.agh.edu.pl> wrote in message
news:8d70ec22ef0d8344645c1add82577e8f$1@www.eclipse.org...
> Hello
>
> I'm writing a custom toolchain plugin to CDT and I have a problem with
> changing discovery compiler invocation command (default gcc).
>
> I tried to follow steps from
> http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg07563.html but it doesn't
> work for me. I don't quite understand what 'our toolset' mean, and if it
> refers to plugin I'm developing or some another plugin.
>
> Anyway, I extended
> org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfi le with custom
> run command and gave it my unique id. Then, in the same plugin, I created
> an extension to org.eclipse.cdt.managedbuilder.core.buildDefinitions with
> necessary projectTypes, configurations etc. I also created a compiler tool
> with inputType scannerConfigDiscoveryProfileId value set to scanner
> configuration I created before.
> But it has no effect: discovery profiles are the same and compiler
> invocation command is still gcc (or g++ for C++).
>
> Can anybody give me a clue how to get this stuff work?
> Thanks

Hi,

Sounds like you're on the right track. I've successfully done the same to
create a custom
scanner which uses a custom compiler command.

One suggestion would be to create a Discovery Profile Page by using the
extension:
org.eclipse.cdt.make.ui.DiscoveryProfilePage
For example:
<extension
point="org.eclipse.cdt.make.ui.DiscoveryProfilePage">
<profilePage
class="org.eclipse.cdt.make.ui.dialogs.GCCPerProjectSCDProfilePage "
name="My Custom Scanner"
profileId="Id of your scanner"/>
</extension>

Then, when you create your project, select its Properties, and have a look
at C/C++ Build> Discovery options. You can see if you project has the right
scanner selected. If not, check to make sure you can find you scanner in the
dropdown list for 'Discovery Profile' (check both scopes per
language/configuration-wide). If you can't find it, then something is wrong
with your extension
org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfi le. If you can
find it, but it is not being set by default, then maybe your id is not quite
correct - check its fully qualified with no typos.

Hope that helps.


--
Tracy Miranda
www.kichwacoders.com
eclipse@kichwacoders.com
Previous Topic:Suspiciouse code in LanguageMappingStore.class
Next Topic:Generating makefile in CDT 5
Goto Forum:
  


Current Time: Tue May 07 22:58:39 GMT 2024

Powered by FUDForum. Page generated in 0.03244 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top