Is there a way to globally declare a #define?
Like I want to have a file that has for instance,
#define MONO
and I want all source-
I know solution for C# projects (I don't tested it for any other projects)
For example you have:
Project1\
Project2\
Solution1\Solution1.sln
Solution2\Solution2.sln
Create SolutionDefines.targets file in solution directory
Project1\
Project2\
Solution1\Solution1.sln
Solution1\SolutionDefines.targets
Solution2\Solution2.sln
Solution2\SolutionDefines.targets
Solution3\Solution2.sln
Solution3\|no target file|
in each project file add:
In Solution1\SolutionDefines.targets add:
$(DefineConstants);TRACING_BUILD
In Solution2\SolutionDefines.targets add:
$(DefineConstants);ANOTHER_DEFINE
In this case you have:
For Solution1 - all projects have TRACING_BUILD define added
For Solution2 - all projects have ANOTHER_DEFINE define added
For Solution3 - all projects - no defines added
In this approach you must store all solutions with solution wide defines in separate directories