Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4.4k
    • Issues 4.4k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • 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
  • Issues
  • #22085

AUTOMOC: OBJECT libraries not propogating moc object files in CMake 3.20

I am using Qt to build an OBJECT library used by two executables. The OBJECT library has the AUTOMOC property set to 'TRUE' and correctly builds the object files of the appropriate moc sources files. However, when the OBJECT library is linked by the desired executable, the OBJECT library is not propagating the moc object files to the targets and the linking stage generates a linker error associated with the missing moc_<src> object files.

This feature worked in cmake 3.19.

I've attached code to demonstrate the problem.

objlib.issue.tbz

Edited Apr 20, 2021 by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking