Its not currently possible to use the same precompiled-header in
more than a single target in the same directory (No way to set
the source file properties differently for each target).
However, I'm wondering if anyone has found a way to re-direct a secondary projects awareness of the cxx_stdafx.pch file this CMake script creates? I share source code across two projects in a single Visual Studio solution, and I get errors related to the generated pre-compiled header file, despite the secondary project specifically set to not use pre-compiled headers.
My functional, but clumsy, work-around is to duplicate the shared source so each project files are entirely separate. Has anyone else had to deal with this issue...?
As noted in this CMake script's caveats:
However, I'm wondering if anyone has found a way to re-direct a secondary projects awareness of the
cxx_stdafx.pch
file this CMake script creates? I share source code across two projects in a single Visual Studio solution, and I get errors related to the generated pre-compiled header file, despite the secondary project specifically set to not use pre-compiled headers.My functional, but clumsy, work-around is to duplicate the shared source so each project files are entirely separate. Has anyone else had to deal with this issue...?