I understand that CDT 7 will have a regular expression error parser included, but I'm using CDT 6 now.
I have an external CDT builder which just calls a shell script to trigger my build, (Jam-based). The build uses GCC, and the errors and warnings are streamed to a Console view, but of course no error parser is looking at it so nothing appears in my Problems view.
Is there a way to configure CDT to use it's GCC scanner on my console output to populate the Problems view? The GCC parser is enabled, it's just not looking at my output.
I'm not sure if this question is still actual, but the following solution should work to populate Problems view:
1) Create an empty C++ makefile in CDT (let's call it solution1
)
2) From the project's context menu (in Project Explorer) select "Import..."
3) In the "Import" wizard select "General/File System", click "Next" and select your source directory. Unfortunately CDT 6 doesn't allow to create references to files like CDT 7. Instead it will copy all sources to to the project's location in the workspace. So the top most directory which you import should contain the Jamroot. Don't forget to check all boxes for all necessary files and folders in the Import diallog.
As a more elegant alternative to Import you can just create a Folder in the eclipse project and link it to the source folder containing necessary Jamfile - thanks Vanuan for the hint.
After the files are added open project properties and do the following changes:
4) Make sure that both CDT Builder and Scanner Configuration Builder are selected on the Builders page. For CDT Builder Properties I recommend to select all options except "During Auto Build"
5) On "C/C++ Build" page uncheck "Use Default Build Command" and put in something like "${HOME}/boost.build/bin/bjam ". In "Build Location" you should put the folder with the necessary jamfile which you want to build from you project hierarchy. For example, "${workspace_loc:/solution1/Server}
"
6) Switch to "Behavior" tab and add necessary bjam parameters for "Build (incremental)" and "clean" options. Uncheck "Build on resource save (Auto Build)"
7) In "C/C++ Build/Settings/Error Parsers" select all necessary parsers. Everything else should be left in default state.
After that you should be good to go.
If you have multiple projects in your source tree and you used "Import" approach, it makes sense to create a separate build configuration for each project and specify corresponding "Build Location" values for them. I use CDT 7 and since it allows to import references to source folders instead of creating physical copies I simply create a separate eclipse project in the workspace for each of the target Jamfiles. In CDT 6 it will also work if you added a linked folder instead of importing the sources.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With