Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340180 - [Scanner Discovery] Per file scanner discovery does not work
Summary: [Scanner Discovery] Per file scanner discovery does not work
Status: RESOLVED WONTFIX
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 12:15 EDT by Markus Schorn CLA
Modified: 2011-03-25 10:16 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 Markus Schorn CLA 2011-03-16 12:15:46 EDT
1) Create a new c++-project with some sources and a makefile
2) Select GCC per file scanner info profile
3) Build the project
4) Generate a parser-log for one of the files in the project and see that
   the built-in includes of the compiler are missing.

The reason is, that the makefile that is dumped into .metadata/.plugins/org.eclipse.cdt.make.core is incorrect. It contains the line:
  gcc ... -f ${project_name}_scd.mk specs.c
where it should read
  gcc ... -E -P -v -dD specs.c

I can fix the issue for my project by editing .cproject and using:
  <runAction arguments="-f ${project_name}_scd.mk | -E -P -v -dD" command="make"
instead of
  <runAction arguments="-f ${project_name}_scd.mk" command="make"

The syntax looks crazy, it was introduced via bug 261280
Comment 1 Markus Schorn CLA 2011-03-25 10:16:08 EDT
I found that the problem does not occur when I use a new workspace.
Because my workspace was pretty old, I don't think this is much of a problem.