I have a solution with two projects A and B. I have a reference to a source file S in each project, and different compile options for the source. Specifically I am using different preprocessor directives in projects A and B. Schematically I have:
Solution
Project A
Source S
Project B
Source S
Is this permitted? Are compile options for S stored at the solution, project or file level?
Compiler options are stored at project level.
It’s perfectly legal to do this, a file can be part of multiple projects and can be compiled with different options, different paths for headers, different preprocessor directives… you name it.