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,924
    • Issues 3,924
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • 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
  • CMake
  • CMakeCMake
  • Merge requests
  • !6964

IntelLLVM: Add dependencies on system header files on Windows

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged William R. Dieter requested to merge williamr/cmake:pch-opts into master Feb 09, 2022
  • Overview 5
  • Commits 3
  • Pipelines 2
  • Changes 3

In !5594 (merged) the IntelLLVM depfile generation flags were taken from Platform/Windows-Intel-C. Those flags were added by !2893 (merged), which forgot to account for commit 6d74e787 (Ninja: Add dependencies on system-provided header files).

The -QMD option generates Makefile dependencies. The -QMMD option generates Makefile dependencies, but excludes system header files. Part of the BuildDepends test includes a header, cmake_pch.hxx, that includes a second header, zot_pch.hxx. The test builds a pch file for cmake_pch.hxx, touches zot_pch.hxx, then verifes that cmake_pch.hxx.pch is regenerated based on the dependencies.

The cmake_pch.hxx contains #pragma system_header before it includes zot_pch.hxx. #pragma system_header indicates that the portion of the file following the pragma is to be treated as a system header.

When -QMMD is used to generate dependencies, the #include of zot_pch.hxx is ignored because it -QMMD says to ignore system headers.

Using -QMD instead uses all headers when generating dependencies and causes this test to pass. The Clang configuration in Platform/Windows-Clang.cmake also uses the -MD option for generating pre-compiled headers, instead of -MMD.

Backport: release
Topic-rename: IntelLLVM-depfile-flags

Edited Feb 09, 2022 by Brad King
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: pch-opts