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,197
    • Issues 3,197
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 15
    • Merge Requests 15
  • 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
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • CMake
  • CMakeCMake
  • Issues
  • #20355

Closed
Open
Opened Feb 14, 2020 by Sergey Larin@cerg2010cerg2010Contributor

PCH generation process breaks programs that rely on compile_commands.json

When a precompiled header is used, CMake creates 2 files for it: cmake_pch.cxx and cmake_pch.hxx. When compiler is run, it creates .pch file by including .hxx file from command line and compiling empty .cxx file. But this behavior breaks programs that use compile_commands.json for preprocessing files from build. When Clang compiler is used, the file included with -include-pch flag is preprocessed by extracting original filename from .pch - in this case, .cxx file will be incorrectly used. All include information from pch generation step is lost. Preprocessed file is corrupted because of that.

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