user3253580
user3253580

Reputation: 31

Eclipse Discovery Options in LUNA

As described in LUNA the Discovery Options have been deprecated, use Preprocessor .... In Indigo, we create a file using make FLG=on &> , using the file and the Discovery Options we can easily resolve the includes for a project. To date in LUNA we have been unable to accomplish the same resolution. Are we simply going to have to do manually or are there a capability we haven't Discovery yet?

Upvotes: 2

Views: 729

Answers (1)

Steven
Steven

Reputation: 433

The new method for Discovery only works with build output in the eclipse console. It cannot load build output from a file as the old Discovery could. In project->properties select the C/C++ Build item in the left pane then select the Builder Settings tab. Uncheck 'Use default build command' and change the build command to 'make FLG=on' (If using CMake this would be 'make VERBOSE=1'). In previous versions you would also have to make sure that you are doing non-parallel builds by deselecting the 'Enable parallel build' check box on the "Behavior" tab. The reason is that make would jumble together parallel output making it difficult to parse. I haven't checked if this is still the case in Luna because I switched to ninja-build which does not jumble parallel build output (and results in much faster builds). If you decide to switch to ninja-build yourself, add the -v flag for verbose output needed by the parser.

Keys to getting the "new" Discovery working

1) Make sure you are generating verbose output. Eclipse is looking for the -I and -D flags. Verify that you are seeing the -I and -D's by checking the CDT Build Console output.

2) Make sure the build output isn't jumbled by either using non-parallel builds, or by using a build system that doesn't jumble parallel build output such as ninja-build.

3) Make sure that the build parser can detect your compile command. Go to project->properties->C/C++ General->Preprocessor Includes Then click on the Providers tab. It will show you a list of providers. Click on the 'CDT GCC Build Output Parser' provider. Make sure that the regular expression matches your entire specific compiler command. I did this by copy-pasting the build output into a text editor then searched for the pattern using the regular expression. Here is the pattern I ended up using (gcc)|([gc]++)|(clang)|([.] .[gc]++) | ([.*] .*g?cc ).

Upvotes: 3

Related Questions