Hi Devin,
The managed build system
is not capable of setting the “includePath” MBS option values from
the list of the CDT include path entries, but on the contrary MBS automatically
add include paths stored in the “includePath” options to the set of
project path entries.
If I understood you
correctly, what you need to do is to add the Include path value to the “includePath”
option of your compiler tool rather than adding the path entry directly. This
will make the include paths you specified in the option be added to the tool invocation
command while generating the makefile. The values you specified will be
automatically translated to the path entries and added to the list of project path
entries, so you don’t need to add the path entry to the project directly,
because MBS will do it for you.
As for the gnu tool-chain,
when the include path is added to the list of includes via the Properties->C/C++
Build->Tool Settings->GCC C++ Compiler->Directories page, the list of
path entries gets automatically updated.
You could use the ManagedBuildManager.setOption(IConfiguration
config, IHoldsOptions holder, IOption option, String[] value) to set the list
of includes you need programmatically. Otherwise you could set include path
option value directly in your tool/tool-chain definition.
Please let me know if you
need more info regarding this.
Thanks,
Mikhail
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Devin Steffler
Sent: Thursday, June 23, 2005 7:51
PM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] How can I
properly add an IPathEntry to an ICProject?
I am trying to add an IPathEntry to a managed build
project.
I
used the following code to add the IPathEntry to the ICProject:
cProject.setRawPathEntries(pathEntries,
new SubProgressMonitor(monitor, 80));
//
where pathEntries is the array of original cProject.getRawPathEntries() plus
the new IPathEntry (note that there is a managed container in this array)
This
works well and displays the Include in the list of the project's Includes but
it doesn't add the path to the managed build properties. Which seems to
be necessary for the project to be compiled properly (without this entry the
#include "files" are not found and have red problem markers on them)
i.e.
Properties->C/C++ Build->Tool Settings->GCC C++
Compiler->Directories
Vlad
mentioned that I need to add the IPathEntry to the managed container noted
above although there is no way to do so through the API. Or should the
managed build be responsible for checking all entries instead of just the
managed container when the makefile is generated and the properties are
displayed in the UI?
Devin
Steffler
IBM's Eclipse CDT
Ottawa (Palladium), Ontario, Canada