conan-io / conan-io/docs

[question] Deleting C++ settings from the package_id ; where to do it

Open
#2,819 6 comments 0 reactions 1 assignee Claimed by @memsharded View on GitHub
Dominant language
C++
Stars
125
Forks
382
Avg merge
22h 39m
Merged PRs (30d)
21

Description

Hi,

I got my memories in a twist this morning trying to explain this to someone else.

I'd gotten used to modifying the package_id in the `package_id()` method of a recipe, such as removing settings that weren't necessary (including things like `header_only`). But then noticed that the recommendation (and our previous usage in recipes) of marking a package as a C library, is to delete them in the `configure()` method.

https://docs.conan.io/en/latest/reference/conanfile/methods.html#configure-config-options
and
https://docs.conan.io/en/latest/reference/conanfile/methods.html#configure-config-options

Can someone remind me of why `configure()` is used?

Is it just because it's executed that much earlier in the package creation?

Or something to do with consuming recipes?

Or something else?

Thanks,
Mark

- [ x] I've read the [CONTRIBUTING guide](https://github.com/conan-io/conan/blob/develop/.github/CONTRIBUTING.md).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.