Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,811
    • Issues 3,811
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

An update will be applied May 24th, between 12PM and 1PM EDT (UTC -400). The site may be slow during that time.

  • CMake
  • CMakeCMake
  • Issues
  • #20686

Closed
Open
Created May 08, 2020 by Andreas Schönle@a.schoenleContributor

PCH: Manual rebuilds necessary with target_precompile_headers( ... REUSE_FROM ...)

When using target_precompile_headers(Bar REUSE_FROM Foo) with the Visual Studio 16 (2019) generator I occasionally run into the problem that all or some consuming targets need an explicit "Rebuild" in Visual Studio. The errors are all linker related and it is unclear to me, what prompts one or the other for each of the projects:

  • fatal error LNK1318: Unexpected PDB error; OK (0) ''
  • fatal error LNK1120: unresolved externals.
  • fatal error LNK1103: debugging information corrupt; recompile module

So far I was unable to reproduce this in the minimal example. The target builds again when touching all source files or when explicitly triggering a target only rebuilt.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking