New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more options for xerces-c recipe #6959
Add more options for xerces-c recipe #6959
Conversation
This comment has been minimized.
This comment has been minimized.
As specified in http://xerces.apache.org/xerces-c/build-3.html#CMake there are a number of project specific options for configuring xerces-c. Currently, only the `XMLCh` type could be configured through a conan option. This commit adds corresponding conan options for all of the other options (i.e. network accessor, transcoder, message loader and mutex manager) that were previously hardcoded. Since not every value of these options is valid on every platform this commit also adds proper validation of the user input to detect invalid configurations. Setting the default value for the conan options is a bit more complicated because for some options this value is not the same for all platforms. Therefore, the `default_options` have been dropped in favor of setting the `options` manually from within `config_options()` if not set by the user.
ba21f60
to
d5775db
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as it is possible, we try to keep compatibility with Python2, which is also supported by Conan v1.x. So, please, avoid those f-strings and type hints.
(I would love to use them everywhere, but it will only be possible when we migrate definitively away from some Conan v1.x constraints)
Thanks!
There are also some general comments about the changes themselves:
|
The problem is that depending on the OS the default value of certain options is different. I could set the
That's not really the case here, I think. All options are supported on all OSes but the values an option can have depend on the OS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that depending on the OS the default value of certain options is different.
There are other examples of this in CCI and we usually put a value in the default and then change it in config_options
examples off the top of my head
self.options.with_ssl = "darwinssl" if tools.is_apple_os(self.settings.os) else "openssl" |
def config_options(self): |
to keep Pyhton 2 compatibility for Conan v1.x
and set different defaults for different OSes in `config_options`
if `curl` is used as `network_accessor`
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can simplify that if
condition if we use always tuples.
Apply suggestions from code review Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>
This comment has been minimized.
This comment has been minimized.
plus use CMake target to pull in the extra deps since CCI curl is build with options
Please consider FMeinicke#1 |
[xerces-c] fix usage around find_package
This comment has been minimized.
This comment has been minimized.
since CURL can be picked up by the standard FindCURL.cmake that comes with CMake
This comment has been minimized.
This comment has been minimized.
Please reopen this review (don't close review when there is no consensus): #6959 (comment) |
…conan xerces-c: fix cross-build when message_loader=icu + use Find CMake module generared by conan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jgsogo
prince-chrismc/conan-center-index-pending-review#1 tells me you're blocking this pr.
@jgsogo ping |
Specify library name and version: xerces-c/3.2.3
As specified in http://xerces.apache.org/xerces-c/build-3.html#CMake
there are a number of project specific options for configuring xerces-c.
Currently, only the
XMLCh
type could be configured through a conanoption. This commit adds corresponding conan options for all of the
other options (i.e. network accessor, transcoder, message loader and
mutex manager) that were previously hardcoded. Since not every value of
these options is valid on every platform this commit also adds proper
validation of the user input to detect invalid configurations. Setting
the default value for the conan options is a bit more complicated
because for some options this value is not the same for all platforms.
Therefore, the
default_options
have been dropped in favor of settingthe
options
manually from withinconfig_options()
if not set by theuser.
conan-center hook activated.