Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoiding using the same pre-compiled header in multiple projects/targets #26

Open
Gazoo101 opened this issue Aug 22, 2023 · 0 comments
Open

Comments

@Gazoo101
Copy link

As noted in this CMake script's caveats:

  • 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...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant