Next: , Previous: Android Features, Up: Top


13 GNU Global

Several tools in CEDET can support the use of GNU Global. If you use GNU Global in your project, you should enable the use of it to enhance or speed up various tools in CEDET.

You can download GNU Global from http://www.gnu.org/software/global

To make sure your GNU Global installation is good, use the command

     M-x cedet-gnu-global-version-check RET

You can wrap any CEDET / GNU Global configurations in your .emacs file like this:

     (setq cedet-global-command "global") ; Change to path of global as needed
     (when (cedet-gnu-global-version-check t)  ; Is it ok?
         ;; Configurations for GNU Global and CEDET
         )

13.1 EDE and GNU Global

The EDE project system can use GNU Global to accelerate finding files within a project. The EDE command to ede-find-file bound to C-c . f is one direct application. semantic also makes heavy use of of the feature to find header files.

To enable it, configure the variable ede-locate-setup-options. Something like this can work in your .emacs file.

     (setq ede-locate-setup-options
           '(ede-locate-global
             ede-locate-base))

13.2 semantic Database

semantic can use GNU Global as a back end for database searches. To enable it, use:

     (semanticdb-enable-gnu-global-databases 'c++-mode)

where the first argument is a major-mode in which to use it.

GNU Global will then be used for project-wide searches as a backup when pre-existing semantic database searches may not have parsed all your files.

13.3 semantic

The semantic symref tool can use GNU Global to local symbol references. This tool will automatically detect GNU Global and use it. You can search for references via the commands:

semantic-symref
Find references to the tag under the cursor.
semantic-symref-symbol
Find references to an arbitrary symbol.