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.2k
    • Issues 4.2k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • 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
  • Issues
  • #24148
Closed
Open
Issue created Nov 09, 2022 by Ben Boeckel@ben.boeckel⛰Developer

add_definitions: add a policy to deprecate the command

Having just looked at the implementation, add_definitions is basically just a generic flag smuggler. It does special things for -D flags, but other than that, it just splats flags into the command line (in the definitions location). I'll also note that there is some "massaging" of its arguments that is completely undocumented (replacing newlines with spaces).

remove_definitions should also go away. Namely, it doesn't support grouped flags.

add_definitions(-Xarch_x86_64 -mavx512)
remove_definitions(-Xarch_x86_64) # `-mavx512` is now "naked"

Cc: @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