Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Configuring a Makefile project to use C++11

Yes, scanner discovery for gcc only looks at a fixed set of flags. I recently had to add a flag for the Arduino target. I’m surprised std=c++11 isn’t there but I didn’t look that closely at it.

Doug.

From: Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx>
Reply-To: "elaskavaia.cdt@xxxxxxxxx" <elaskavaia.cdt@xxxxxxxxx>, "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Monday, March 16, 2015 at 8:51 AM
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Configuring a Makefile project to use C++11

I think we should fix scanner discovery to adjust language flags for the project. Compiler spec parser and standard project one are two different parsers afaik...

On Sun, Mar 15, 2015 at 10:57 PM, Nathan Ridge <zeratul976@xxxxxxxxxxx> wrote:
Hi,

I'm wondering what is the correct mechanism to configure a Makefile project to be parsed as C++11.

Specifically, I'd like the indexer to parse the C++11 portions of standard library headers.

In CDT 8.3, a mechanism was added for specifying the language standard in Tool Settings [1], but I recently realized [2] that it does not apply to Makefile projects.

It occurred to me that perhaps the intention for Makefile projects was to have the build output parser pick up the '-std=c++11' flag from the build output, but I tested this and it does not work - after building with the '-std=c++11' flag appearing in the build output and reindexing, headers are still parsed as C++03.

The only way I've found to get headers to be parsed as C++11 for a Makefile project is to manually add '-std=c++11' to the "Command to get compiler specs" of the CDT GCC Built-in Compiler Settings provider.

Is this the intended way? If so, can we give users a better way?

Thanks,
Nate

[1] https://wiki.eclipse.org/CDT/User/NewIn83#Build
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=449542#c5

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top