Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

CDT/Obsolete/ScannerDiscovery61/Stories

< CDT‎ | Obsolete‎ | ScannerDiscovery61
Revision as of 23:16, 14 September 2010 by Angvoz.dev.gmail.com (Talk | contribs) (Boost Story)

The Stories and The Alpha Version of Scanner Discovery for CDT 8.0

Disclaimer

I am about to attach Work In Progress Alpha version of Scanner Discovery for CDT 8.0 to 290631. This is generally working version but may be rough on the edges. The code is far from clean and not suitable for commit.

There is a lot of moving parts and connection points to wire to CDT. I may have missed some - if you notice let me know. So far my biggest concern was to connect the moving parts and keep it from falling apart. Big thanks to git and its rebase feature BTW. UI is pretty much experimental and needs to be reworked from interaction design standpoint and consolidated with existing one. I shall go again along the stories posted trying to streamline the flow from user POV. If your scenario is missing, please let me know.

So far there was not much of feedback and I'd be happy to get any at the Summit. I won't attend, so please post thoughts in 290631. If feedback is positive, my plan is to add this to CDT 8.0 peacemeal. I would split it to smaller pieces and work on each one under a separate bugzilla.

Andrew Gvozdev

Legacy Projects

Special care is being taken to keep the choice of using legacy Scanner Discovery mechanism. That choice could be the default until the new functionality is stable enough. There is a checkbox in New Project Wizard to enable/disable it on project creation (see #Regular Use). The new stuff is enabled by default in demo version though - solely for the demo purpose.

Regular Use

For the regular user using project types and toolchains supported by CDT, no any special setup is necessary.

Scanner discovery for a project is defined when the project is created by New Project Wizard. It is possible to enable the new "alpha" version or keep using legacy method.

SD80 RegularUseStory.png

If user is using legacy discovery it is still possible to use project properties to use new scanner discovery providers (see [LanguageSettingsProviders]).

Boost Story

Here is an example how you would setup Boost libraries project in eclipse. This does not require any special settings related to Scanner Discovery, just setting it up to compile and bjam option to provoke compiler command in output.

  1. Download latest boost library from http://sourceforge.net/projects/boost/files/boost/1.44.0/
  2. Download also bjam from there
  3. Unzip the source somewhere outside the workspace and copy bjam.exe into the source root.
  4. Using wizard "Makefile Project with Existing Code" create a new Makefile project with appropriate toolchain (MinGW in this example) referring to the folder with boost sources.
    SD80 BoostStory NewMakefileProjectFromExisting.png
  5. In project properties change settings to be able to compile:
    • In Tool Chain Editor select "Gnu Make Builder"
    • In C/C++ Build/Builder Settings: Use External Builder
    • Uncheck "Generate Makefiles automatically"
    • Uncheck "Use default build command"
    • Set "Build Command" to "bjam -d+2 --toolset=gcc --with-python". This is to compile python library only. Option "-d+2" is needed to get compiler command printed in the output. If you add "-na" options it will print the output but not compile.
    • In Behaviour Tab remove "all" from "Build (Incremental build)" target.
    • Save settings.
  6. Build the project.

The project may not compile successfully everything but it is not the point here. It generates enough build output to demonstrate how scanner discovery picks compilation options and assigns them to proper resources in the project.

In the project properties->Paths and Symbols->All Language Settings tab you can see which language settings providers are used and which settings the providers retrieved.

File:SD80 BoostStory AllLanguageSettings.png

More stories and screenshots to follow

Back to the top