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 15
    • Merge requests 15
  • 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
  • !6756

Help: Document more use cases for CMAKE_POLICY_DEFAULT_CMPNNNN

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Brad King requested to merge brad.king/cmake:doc-policy-default into master Nov 22, 2021
  • Overview 3
  • Commits 3
  • Pipelines 1
  • Changes 3

The documentation for this variable previously said it should not be set by project code so that users can set it as a cache entry instead. Generalize this explanation to mean that the project should not set its own policies with this variable, and that the purpose of the variable is to allow policies not set by the project to be controlled externally.

Policies CMP0077 and CMP00126 are particularly important when using add_subdirectory to add a third-party project. Suggest CMAKE_POLICY_DEFAULT_CMP{0077,0126} as a way to set the policies without modifying third-party code.

Issue: #20490 (closed)
Backport: release

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: doc-policy-default