Files
conan-center-index/docs/adding_packages/dependencies.md
Chris Mc e70b881101 (#14211) docs: split some policies by the implicated method
* docs: split some policies by the implicated method

* fix broken link

* fix broken link

* Apply suggestions from code review

Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>
Co-authored-by: SSE4 <tomskside@gmail.com>

Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>
Co-authored-by: SSE4 <tomskside@gmail.com>
2022-11-21 18:45:43 +01:00

1.2 KiB

Dependencies

This section outlines all the practices and guidelines for the requirements() and build_requirements() methods. This includes everything from "vendored" dependencies to when and how the versions could be changed.

Contents

Rules

  • Version range is not allowed.
  • Specify explicit RREV (recipe revision) of dependencies is not allowed.
  • Vendoring in library source code should be removed (best effort) to avoid potential ODR violations. If upstream takes care to rename symbols, it may be acceptable.
  • Only ConanCenter recipes are allowed in requires/requirements() and build_requires/build_requirements().
  • If a requirement is conditional, this condition must not depend on build context. Build requirements don't have this constraint.
  • Forcing options of dependencies inside a recipe should be avoided, except if it is mandatory for the library - in which case it must be enforced through the validate() methods.