Skip to content

[question] More details about overriding upstream options from downstream recipes #1831

Open
@SpaceIm

Description

@SpaceIm

I still don't completely understand how and when upstream options are overridden, and which recipe takes precedence if multiple downstream recipes override options of a common upstream recipe.

https://docs.conan.io/en/latest/mastering/conditional.html claims that upstream recipes options should be overridden in configure method when it is absolutely necessary.

  • If multiple recipes override the same upstream option, which recipe wins?
    Let's say for these two cases:

    • two direct parents override the same option of their common child.
    • one direct parent and root override the same option.
  • some recipes like https://github.com/conan-community/conan-opencv conditionally override several upstream options in requirements method instead of configure method. Can we expect the same behaviour as if they would have been overridden in configure method (in case of conflicts with other recipes, does overriding this option in requirements take precedence over overriding inconfigure method, without respect of rules in first point)? Is is the same to override after self.requires("upstream") or before, in requirements method? Is it bad practice to override in requirements method?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions