Losing C++11 settings in Neon.2 [message #1752445] |
Mon, 23 January 2017 20:01 |
Nathan Bahr Messages: 7 Registered: January 2017 |
Junior Member |
|
|
I have an existing c++ project that I have set up in eclipse that uses c++11. In order for the indexer to work correctly I am setting this
C/C++ General > Preprocessor Include Paths,Marcros, etc > CDT GCC Built-in Compiler setting
to
${COMMAND} ${FLAGS} -E -P -v -dD -std=c++11 "${INPUTS}"
Then I rebuild the index, and it works, but whenever there are big changes, like if I update from svn and there are changes that add or remove files and I refresh the project in eclipse, it starts marking all the c++11 stuff as errors and I go and check the setting and it is back to the original (without the -std=c++11 flag).
I have tried setting it globally as well as project specific, either way it always resets. And when I set it to use the global settings by checking the "Use global provider shared between projects", it is always unchecked again when it resets.
If I am doing local, incremental changes then everything is fine, so I have lived with it so far but as more people are starting to contribute to the code it's getting to be more of a headache.
|
|
|
|
Re: Losing C++11 settings in Neon.2 [message #1753328 is a reply to message #1752850] |
Fri, 03 February 2017 22:12 |
Nathan Bahr Messages: 7 Registered: January 2017 |
Junior Member |
|
|
That file, actually the whole .setting folder, is ignored in svn because I don't want it under version control. The folder and file are both RW so that's not the issue.
When I check the language settings file, it accurately reflects what is set in the GUI. The problem is, when I change the setting by adding the -std=c++11 flag, it gets saved to that file, and the eclipse indexer works, but seemingly randomly, at some later time, the indexer will start marking things as errors and when I check that file and the gui settings, they are both reverted back to the default state.
I have that flag set in the global settings(and it seems to stick there) and I have tried setting the project settings to use the global as well as setting it specifically for the project, either way it always reverts back to project-specific without the flag.
I thought that it mainly only happens when big changes happen all at once on the codebase, like an svn update or applying a patch, but it appears to happen more randomly than that.
|
|
|
|
|
Re: Losing C++11 settings in Neon.2 [message #1753364 is a reply to message #1753361] |
Sat, 04 February 2017 19:50 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
Sorry. I misread your problem. The setting in .cproject is for the makefile creation.
Under .<Project>/.settings/language.settings.xml there is an entry for each build configuration either:
1) If global builtin command: project/configuration/extension/provider-reference
with "id" indicating which provider and "ref" set to "shared-provider"
The id will be something like GCCBuiltinSpecsDetector
2) if local builtin command: project/configuration/extension/provider
with provider info including the command
IIRC, the usual name for the configuration is "Default" for a makefile project and the name of the active configuration is stored in .cproject
If you have more than one build configuration, this could be what is getting reset. Normally, for a makefile project, you wouldn't expect multiple configurations but with some finagling it's possible. One of my makefile projects has two configurations, Default and Debug.
If you have more than one configuration, set them all to use the global provider.
[Updated on: Sun, 05 February 2017 13:30] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Losing C++11 settings in Neon.2 [message #1753477 is a reply to message #1753473] |
Mon, 06 February 2017 22:21 |
David Vavra Messages: 1426 Registered: October 2012 |
Senior Member |
|
|
I tried setting mine to RO and there was no write attempt.
Wouldn't think it would try unless the provider info has changed and then only if you pressed Apply or OK in the dialog box.
Certainly is odd.
Along with making a new Workspace, you could try importing the project from scratch using just the source, Copy the project to another directory; delete .settings,.project and .cproject then import it.
[Updated on: Mon, 06 February 2017 23:01] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02687 seconds