Bug 454158 - [autotools] - setting advance options according the selected toolchain
Summary: [autotools] - setting advance options according the selected toolchain
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-autotools (show other bugs)
Version: Next   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Jeff Johnston CLA
QA Contact: Jeff Johnston CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-04 12:15 EST by Rafael Sene CLA
Modified: 2014-12-05 07:48 EST (History)
2 users (show)

See Also:


Attachments
XLC Preferences (40.79 KB, image/png)
2014-12-05 07:43 EST, Rafael Sene CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Sene CLA 2014-12-04 12:15:04 EST
When creating an autools project and selecting a toolchain which is not the defaulft GCC I need to set some flags accordingly (for instance CC, CFLAGS, CXXFLAGS, etc). 

Today I can do it through the project preferences (Autotools > Configure Settings > Advanced). It works, but as a user I would like to be able to set some advanced options during the project creation wizard, without the necessity to navigate through a set of options.

This capacity could be extended, allowing a customized toolchain to set these options automatically.
Comment 1 Jeff Johnston CLA 2014-12-04 17:06:55 EST
So, as mentioned, I would propose a new Wizard page that copies the Advanced Options page (perhaps we can reuse it).

Everything on the page should be fine.  We will assume that the configure script will do something with the CFLAGS and CXXFLAGS variables we will set for gcov/gprof/debug.

There is an extension for adding Managed Wizard pages:

org.eclipse.cdt.managedbuilder.ui.newWizardPages

which allows specification of a natureId, projectType, or toolchainId for which it applies.  Since we can't know what toolchains will be added in the future and I don't know if the natureId will be set when this page gets called, I think that the projectType should be fine.

An example of such a page is used for XLC.  The extension specifies a page class and an operational class which runs in a thread.  The XLCSettingsWizardRunnable class is an example of such an operational class.  That class sets project properties which can later be used.  I kind of like that method.  We could set a property for each flag option (so we can set the appropriate configuration fields and one for the user command string).  The createProject for the Autotools wizard could then query the values and set them after fetching the default configuration.

An extension could be added to the toolchain which I assume we can get from the MBS pages and we could get a default user field.

What do you think?
Comment 2 Rafael Sene CLA 2014-12-05 07:43:27 EST
Created attachment 249188 [details]
XLC Preferences

XLC Preferences
Comment 3 Rafael Sene CLA 2014-12-05 07:48:39 EST
Looks like it a good plan. We can start from this point and adapt according the needs.

Should we create a entry at the preference page for each autotools option or select a set (the most used)