[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] Configuring a Makefile project to use C++11
|
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