My organization has a large C/C++ codebase. We build many binaries from subsets of this codebase, both production and test binaries. There are many build variants. The same C/C++ source files are compiled with different -I and -D compiler flags in different binaries. Example: Binary "test1" might compile "file.c" with one set of -I and -D flags, while "test2" compiles the same file with other flags.
How do you set up an Eclipse CDT project for such a codebase?
We have tried two approaches, which both were fairly unsuccessful:
Create one project for each binary, with its -I and -D flags.
Create one project with the union of all -I and -D from all binaries.