That makes too much sense. Thanks much for the explanation.

On Saturday, May 3, 2014, Dave Brotherstone <notifications@github.com>
wrote:

> In src/stdafx.cpp:
>
> > @@ -2,7 +2,7 @@
> >  // BufferSwitcher.pch will be the pre-compiled header
> >  // stdafx.obj will contain the pre-compiled type information
> >
> > -#include "stdafx.h"
> > +#include <precompiledHeaders.h>
>
> Sharing precompiledHeaders between projects is bad practice - this isn't
> doing that, but it's on the way as you've got two sort-of sub projects
> using the same header via the include path. I've found using a header from
> the include path (ie. with ), can lead to some things being built
> unnecessarily, or some files always rebuilding.
>
> The common directory shouldn't really share any files with the src
> directory, but likewise it doesn't really make sense to put the precompiled
> header in the common directory, then reference it from source, as that
> would mean your project specific general headers would go in as "common". I
> don't think having two files works, as you'd need two lots of precompiled
> header output, which I don't think you can have for a single project.
> Splitting this into two projects would be the right way to go, but that's
> probably quite a bit of effort. I would probably pragmatically say put the
> precompiledHeader.h in src, and for the common CPPs, just use #include
> "../src/precompiledHeader.h". You might have to set the name of the
> precompiled header in the properties of the common cpp files too.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/davegb3/FileSwitcher/pull/1/files#r12258113>
> .
>