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,807
    • Issues 3,807
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • 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
  • Issues
  • #21559

Closed
Open
Created Dec 07, 2020 by Craig Scott@craig.scottMaintainer

Auto dependency behavior of $<TARGET_FILE_NAME> is ambiguous

Prior to CMake 3.19, many generator expressions that mentioned targets directly as command arguments in add_custom_command() or add_custom_target() would result in a dependency on that target being automatically added. This behavior was relaxed in !5127 (merged), subject to policy CMP0112. The documentation updates in that MR seem to have left out making the behavior for $<TARGET_FILE_NAME:...> clear. For all other $<TARGET_xxx:...> expressions, one can work out the behavior from the documentation of CMP0112, the add_custom_...() commands and the Target-Dependent Queries section of the cmake-generator-expressions manual. I suspect either $<TARGET_FILE_NAME:...> was mistakenly omitted from the CMP0112 docs or a note should be added for it in the cmake-generator-expressions manual like the others.

Cc: @robertmaynard

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking