Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,235
    • Issues 3,235
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 14
    • Merge Requests 14
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #19839

Closed
Open
Opened Oct 15, 2019 by alcroito@alcroito💬Developer

PCH: Issue with mixing C and C++ within a target

If a target contains both C and C++ sources, and specifies a precompiled header which has a C++ class, CMake will try to build a pch file for the C language, which will obviously fail due to treating the header as C code.

I think it would be useful to either specify what language a pch file is for, or allow skipping some languages.

Sample project attached:

pch_c_language_issue.zip

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
3.16.0
Milestone
3.16.0 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: cmake/cmake#19839