Open andrey-zherikov opened 3 months ago
Note that if I don't have shared
in options
, conan 2.4.1 errors out:
ERROR: mylib/1.0: Package type is 'library', but no 'shared' option declared
Hi @andrey-zherikov
Thanks for your question.
This is the injected code:
# injected in ``config_options()`` method
def auto_shared_fpic_config_options(conanfile):
if conanfile.settings.get_safe("os") == "Windows":
conanfile.options.rm_safe("fPIC")
# injected in ``configure()`` method
def auto_shared_fpic_configure(conanfile):
if conanfile.options.get_safe("header_only"):
conanfile.options.rm_safe("fPIC")
conanfile.options.rm_safe("shared")
elif conanfile.options.get_safe("shared"):
conanfile.options.rm_safe("fPIC")
Note that if I don't have shared in options, conan 2.4.1 errors out:
Yes, this is expected. Defining package_type = "library"
means that a shared
option must be defined.
Please let me know if this clarifies the issue. Thanks!
@memsharded Thanks for the clarification! Could you please make documentation clearer and consistent?
Sure, moving this to the docs repo. As you can see, the docs is also an open source Git repo, improvements and contributions are also welcomed.
What is your question?
This doc says:
This says:
And this one says:
What does
auto_shared_fpic
actually do?Have you read the CONTRIBUTING guide?