If you're building a C/C++ project, this tab lets you control how include paths and C/C++ macro
definitions for this particular project are automatically discovered. Certain features of the
IDE (e.g. syntax highlighting, code assistance, etc.) rely on this information, as do source-code
parsers. You can configure various options for the scanner configuration on the Discovery Options
page of the Makefile Project panel in the Preferences window.
Figure 1. Controlling how include paths and C/C++ macro definitions are automatically discovered on the Discovery options
tab.
Note: At a later time, you can supply this data using the Search Paths item in the project properties.
-
Configuration
- Refer to the "Builder settings tab" section for more information about the Configuration field.
-
Discovery Profiles Scope
- Specifies the type of profile to set for discovery:
- Per Language — Enables the association of different profiles with different resource types (different tools and input types), to have
different settings discovered, e.g. for C and C++ source files and for different tools used by the project. In addition, selecting
this option lets you specify different profile settings for different folders; however, only project profile types are allowed.
- Configuration-wide — The Eclipse CDT uses only one profile for discovering scanner information for the entire project (configuration). This
means that both the project and per-file discovery profiles are allowed.
- Left pane list (language specific)
- Shows a list of language specific compilers. Select a language from the list.
-
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
- Sets the notification of diagnostic errors for include paths that the Eclipse CDT is unable to 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
- Lets you load a file to discover paths and symbols based on a previous builds' output. To activate the discovery select a
build log file and then click the Load button. This button is only visible when Configuration is set to Release and the Discovery Profiles Scope is set to Configuration-wide. Note that you can click Variables to open the Select Variables window to define a build output file.
-
Load build output from file
- Specifies the name of the file you selected to load the build output from. This button is only visible when Configuration is set to Release and the Discovery Profiles Scope is set to Configuration-wide.
-
Browse
- Click to locate a previously built output file. This button is only visible when Configuration is set to Release and the Discovery Profiles Scope is set to Configuration-wide.
-
Variables
- Click to specify an argument, or create and configure simple launch variables which you can reference in some launch configurations.
This button is only visible when Configuration is set to Release and the Discovery Profiles Scope is set to Configuration-wide.
-
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.