conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.3k stars 985 forks source link

[question] Conan create package from pre-built binaries #17227

Closed FannoFlow1 closed 1 month ago

FannoFlow1 commented 1 month ago

What is your question?

In general, does conan create support creating a package from pre-built binaries from a conan build ?

The general workflow being:

# build
conan install . --profile=foo -s build_type=Release
cmake --preset conan-release
cmake --build --preset conan-release

# test
unit test

# analyze
coverage
trace
lint
format
...

# package
conan create # <-- can this use the binaries from the above build?
conan upload

Generally this is to ensure the binaries that were tested are the ones pushed to the released area / Artifactory.

Have you read the CONTRIBUTING guide?

memsharded commented 1 month ago

Hi @FannoFlow1

Thanks for your question

In general, does conan create support creating a package from pre-built binaries from a conan build ?

No, the conan create command is exactly for ensuring that a clean and isolated build in the cache is done.

I think you are looking for the conan export-pkg, which is intended to create packages from binaries in the user space, both for when those binaries are pre-compiled closed source from a vendor, or even if you built those binaries with a local conan build command.

Please check this page in the docs: https://docs.conan.io/2/tutorial/developing_packages/local_package_development_flow.html, it explains this use case.

FannoFlow1 commented 1 month ago

Yep that looks like exactly what I'm looking for! thanks!