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,818
    • Issues 3,818
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • 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
  • #16414
Closed
Open
Created Nov 09, 2016 by Tschijnmo TSCHAU@tschijnmo

Namespace support for target names in nested projects

Currently in CMake, there seems to be a very nice option of NAMESPACE for the INSTALL(EXPORT ...) command. This could save a lot of trouble for the users of the project about conflicts in target names.

However, if for some reason, the project is nested inside the source tree of the user project, for example, by using git submodule, when using add_subdirectory to add the subproject, the target names in the subproject are fixed. So the users have to be careful about the conflict of target names.

So I guess maybe it can probably be nice if the add_subdirectory command can have something similar to the NAMESPACE option, so that the target names defined in the nested directory, either with or without a project call in itself, could be renamed with a prefix in the scope of the user. Any comments or suggestions about alternatives will be appreciated!

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