Skip to content
GitLab
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 4,105
    • Issues 4,105
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and 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
  • CMakeCMake
  • CMakeCMake
  • Merge requests
  • !6381

AutoGen: Fix needless compilation of mocs_compilation.cpp

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Alexey Edelev requested to merge semlanik/cmake:fix-22338 into master Jul 23, 2021
  • Overview 3
  • Commits 1
  • Pipelines 1
  • Changes 1

For an AUTOMOC'ed target foo, when depfiles are used, there are the following dependencies:

foo_autogen -> foo_autogen/timestamp foo_autogen/mocs_compilation.cpp -> foo_autogen/timestamp

The first is used to trigger AUTOGEN. The second erroneously triggers a recompilation of mocs_compilation.cpp when any source file of target foo is touched.

Remove the latter dependency and replace it with an order-only dependency from foo_autogen/mocs_compilation.cpp to foo_autogen_timestamp_deps.

That is achieved by making mocs_compilation.cpp or its per-configuration variants byproduct(s) of the timestamp file.

Fixes: #22338 (closed)
Backport: release
Topic-rename: autogen-deps

Edited Jul 23, 2021 by Brad King
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-22338