Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How to get the toolchain option with specified ID fromICProject object?

>> Subject: [cdt-dev] How to get the toolchain option with 
>> specified ID fromICProject object?
>> 
>> Hello.
>> For example, I have set some option for the C/C++ project 
>> (Project -> Properties -> C/C++ Build -> Settings, option has 
>> "enumerated" valueType).
>> How to get the value of this option, having only ICProject variable?

> I believe you need to create a managed build project object using the
> ManagedBuildManager and then navigate from there.
> 
> Great use case for the new new project model I'm working on. You should
> be able to adapt from the ICProject in that direction as well.

We're indeed currently using the ManagedBuildManager for this, you
could use something like:

IProject project = YourICProjectVariable.getProject();
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
IConfiguration config = info.getDefaultConfiguration();
IToolchain tch = config.getToolChain();
for ( IOption option : tch.getOptions() ) ...


Back to the top