Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357927

Summary: Scanner discovery should figure out options to use like -std=c++0x automatically
Product: [Tools] CDT Reporter: Andrew Gvozdev <angvoz.dev>
Component: cdt-buildAssignee: cdt-build-inbox <cdt-build-inbox>
Status: RESOLVED DUPLICATE QA Contact: Andrew Gvozdev <angvoz.dev>
Severity: normal    
Priority: P3 CC: cdtdoug, matt, notifications+eclipse.org, woskimi, yevshif
Version: 8.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Andrew Gvozdev CLA 2011-09-16 07:41:16 EDT
-- Created from bug 356062 Comment 7 --

We should make it easier for the user to keep the build-settings in sync with the compiler inspection done as part of the scanner discovery. Many of the compiler options influence the predefined macros and/or the predefined include search path. The option -std=c++0x is just an example for that.

There are probably two use cases:
(1) Managed build:
    The user has to add the compiler option for the build and separately
    he needs to adjust the command-line for the compiler inspection.
    Can we reuse the settings specified for the build?
(2) Unmanaged build:
    The option has to be defined somewhere in a makefile.
    Can we grab the compiler options via the build-output parser?
Comment 1 Matt Hargett CLA 2011-12-04 09:21:22 EST
This would be extremely useful for mixed C/C++ projects, where one configuration builds a given file as C, and another configuration builds the same given files as C++. It's also extremely useful since specific files being compiled with -std=c99 or -std=c++11 will have slightly different built-in symbols.
Comment 2 Andrew Gvozdev CLA 2013-07-21 04:33:01 EDT
*** Bug 404913 has been marked as a duplicate of this bug. ***
Comment 3 Andrew Gvozdev CLA 2013-07-22 01:24:05 EDT
There are separate bugs open for both issues.
(1) is covered by bug 404913 and (2) by bug 388484.

*** This bug has been marked as a duplicate of bug 388484 ***