Bug 448469 - Use current directory for parsing include paths in GCC output parser
Summary: Use current directory for parsing include paths in GCC output parser
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: Next   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-23 07:06 EDT by Jan Pohanka CLA
Modified: 2020-09-04 15:23 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pohanka CLA 2014-10-23 07:06:57 EDT
It can happen that project or workspace directory differs from actual one where the source files are built. For example make can change actual directory using -C switch like eg.

make -C ~/src/myapp all

Include directories specified in the makefile are usually relative and the output parsers does not prefix them with whole path.

The sequence of commands can look like this
cd /my/nice/dir
gcc -Dinclude -o output_binary /full/path/to/source.c

and it needs to include /my/nice/dir/include instead of the relative one.

Only workaround I know is to include absolute paths of these directories to CDT user settings but it would be nice if the parser can deal with this by itself.