Skip to content

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

Description

@Gazoo101

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions