Skip to content

[question] What is the difference between test_requires() or build_requires(, force_host_context=True) and requires with "private" flag? #13956

Closed
@SzBosch

Description

@SzBosch

What is your question?

What is the difference between test_requires() or build_requires(, force_host_context=True) and requires with "private" flag?

This refers to the documentation:
https://docs.conan.io/1/devtools/build_requires.html#build-and-host-contexts
https://docs.conan.io/1/reference/conanfile/attributes.html#requires

e.g. what is the difference between:

def build_requirements(self):
        self.test_requires("pkgA/0.1")

and

def requirements(self):
        self.requires("pkgA/0.1", "private")

?

I assume in both cases it does not lead to transitive dependencies and they are in the host context, right?

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions