Skip to content
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 option for XML_UNICODE_WCHAR_T in CMakeLists.txt #207

Closed
frast opened this issue Aug 6, 2018 · 2 comments
Closed

Add option for XML_UNICODE_WCHAR_T in CMakeLists.txt #207

frast opened this issue Aug 6, 2018 · 2 comments

Comments

@frast
Copy link

frast commented Aug 6, 2018

Would it be possible to add an option in CMakeLists.txt to switch XML_UNICODE_WCHAR_T ON? I want this to add a feature to the portfile in vcpkg, which compiles expat with this option. Is this a good idea or are there other ways to do this? I do not know how to work with cmake, so I am not able to come up with a patch for this. Any help would be appreciated.

@hartwork
Copy link
Member

hartwork commented Aug 6, 2018

Sounds like a good idea, yes.

There are four related options that are included with CMakeLists.txt as of now: XML_DTD, XML_NS and XML_CONTEXT_BYTES (that affect rendering of expat_config.h.cmake to expat_config.h) and XML_DEV_URANDOM (that adds -DXML_DEV_URANDOM to preprocessor flags on non-Windows platforms, directly).

The way that XML_DEV_URANDOM works with CMake right now seems inconsistent for no good reason. So I'd propose to first make XML_DEV_URANDOM work like XML_DTD and friends (with an entry in expat_config.h.cmake and using set, then add two new options just like them for XML_UNICODE and XML_UNICODE_WCHAR_T.

Are you sure you want to pass on this chance to get a little closer to CMake, getting review and contributing to Expat? If things get merged your name will be in the change log as well :)

@frast
Copy link
Author

frast commented Aug 7, 2018

I created a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants