8

In order to set up C++11 for specific projects, I'm required to add -std=c++11 to the CDT GCC Built-in Compiler Settings under Project -> Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc.

This creates a file called .settings/language.settings.xml under every project that requires C++11. This file contains the -std=c++11 setting.

I'm committing this file into git, but alas, the file also contains an environment hash that is recalculated for every different server.

The result is merge nightmare, where every developer has to constantly revert or commit the changes in language.settings.xml in order to work. and each time that happens, the indexer will start re-indexing everything.

Can I avoid this? can I set the indexer for C++11 per project in a different manner?

Edit: I can't just gitignore the files, because I need to share them with all developers.

Shloim
  • 5,281
  • 21
  • 36

2 Answers2

0

I also use Eclipse and GIT together. Usually I make sure that all Eclipse generated files are not committed to the GIT repo. In my opinion they are not part of the code, in the sense that someone willing to recompile and run your project doesn't need those.

In GIT this can be achieved with the .gitignore file for example. See here for complete information: https://git-scm.com/docs/gitignore

pasadrul
  • 21
  • 1
0

You can try using skip-worktre. See

While this is certainly a workaround, it is better than nothing.

Morty
  • 2,889
  • 2
  • 19
  • 28