C ++ 11 settings in conflict of Eclipse Indexer with git

To configure C ++ 11 for specific projects, I have to add -std=c++11in CDT GCC Built-in Compiler Settingsthe section Project → Properties → C / C ++ General → Preprocessor Include Paths, Macros, etc.

Creates a file called .settings/language.settings.xmlfor each project that requires C ++ 11. This file contains a parameter -std=c++11.

I write this file in git, but, alas, the file also contains an environment hash that is recounted for every other server.

The result is a merge nightmare, where each developer must constantly revert or commit changes to in language.settings.xmlorder to work. and every time this happens, the indexer will reindex everything.

Can this be avoided? can I set the indexer for C ++ 11 for each project in a different way?

Edit: I cannot just gitignore files, because I need to share them with all developers.

+4
source share
1 answer

I also use Eclipse and GIT together. Usually I’m sure that all the files created by Eclipse are not transferred to the GIT repository. In my opinion, they are not part of the code, in the sense that someone who wants to recompile and run your project does not need this.

In GIT, this can be achieved, for example, with a .gitignore file. See here for full details: https://git-scm.com/docs/gitignore

0
source

All Articles