Discovery options panel

If you're building a C/C++ project, this panel lets you control how include paths and C/C++ macro definitions for this particular project are automatically discovered. Certain IDE features, such as syntax highlighting and code assistance, rely on this information, as do source code parsers.

Configuration
Lets you select a build configuration. The settings you define in the other fields will then be applied to that configuration only. Build configurations are based on the architecture of the target platform (e.g., x86, ARM) and whether a Debug or Release binary is generated. A Debug configuration lets you see what's going on inside a program as it executes. A Release configuration creates applications with the best performance.
Discovery profiles scope
Specifies the type of profile to set for discovery:
  • Per Language — Enables the association of different profiles with different resource types, to have different settings discovered; for example, for C and C++ source files and for various tools used by the project. Selecting this option also lets you specify different profile settings for different folders; however, only project profile types are allowed.

    When this option is selected, the left pane shown just below the Discovery profiles scope field lists the language-specific compilers. You must click one of the list entries to make the settings in the fields on the right apply to that compiler.

  • Configuration-wide — The Eclipse CDT uses only one profile for discovering scanner information for the entire project configuration. This means that both project and per-file discovery profiles are allowed.

    When this option is selected, the left pane show just below the Discovery profiles scope field lists the current configuration (which is the one selected in the Configuration field at the top).

Automate discovery of paths and symbols
Scans the build output to populate the path and symbol tables, such as symbol definitions, system include directories, local include directories, macros, and include files.
Report path detection problems
Enables notification of diagnostic errors for include paths that the Eclipse CDT can't resolve.
Discovery profile
Indicates the discovery profile to use for paths and symbol detection. The type of configuration and Discovery Profile Scope you specify determine which Discovery Profile options appear on this tab.
Enable build output scanner info discovery
Configures the scanner to parse build output for compiler commands with options that specify the definition of preprocessor symbols, and include search paths (for GCC compiler, -D and -I respectively). This button is only visible when Configuration is set to Release and the Discovery Profiles Scope is set to Configuration-wide.
Load build output from file
Specifies the name of the file from which to load the build output (in the text field below). The Load button is only visible when Configuration is set to Release and the Discovery Profiles Scope is set to Configuration-wide. Clicking this button opens a window from which you can select a file to discover paths and symbols based on a previous builds' output.
There are also two other buttons that help you fill in the text field:
  • Browse — Click to locate a previously built output file using a file selector.
  • Variables — Click to specify an argument or create and configure simple launch variables which you can reference in some launch configurations.
Enable generate scanner info command
Enables the retrieval of information from the scanner. If it is not selected, the includes will be populated with default gcc system includes. Eclipse gathers the compiler settings based on the specified toolchain. This means that the Eclipse CDT can obtain the default gcc system includes to associate with the project. When selected, you can specify any required compiler specific commands in the Compiler invocation command field.
Compiler invocation command
Indicates the compiler specific command used to invoke the compiler. For example, the command gcc -E -P -v hello.c | hello.cpp reads a compiler's configuration file and prints out information that includes the compiler's internally defined preprocessor symbols and include search paths.

The information is complementary to the scanner configuration discovered when the output is parsed (if you've enabled the Enable build output scanner info discovery option), and is added to the project's scanner configuration. You can click Browse to locate this command, if required.

The parsing of build output for scanner information is compiler specific. For example, the GNU toolchain compilers (gcc and g++) use -I for include paths, and -D for symbol definitions. Consult your compiler specific documentation for more information about scanner information commands, such as the following gcc commands:

  • -D name
  • -I
  • -U name
  • -I-
  • -nostdinc
  • -nostdinc++
  • -include file
  • -imacros file
  • -idirafter dir
  • -isystem dir
  • -iprefix prefix
  • -iwithprefix dir
  • -iwithprefixbefore dir
Browse
Browse for a file to include in the compiler invocation command. This button is only visible when Configuration is set to Release and the Discovery profiles scope is set to Configuration-wide.