taocpp / PEGTL

Parsing Expression Grammar Template Library
Boost Software License 1.0
1.94k stars 228 forks source link

UWP support #137

Closed jedelbo closed 5 years ago

jedelbo commented 5 years ago

I am not sure if you aim to be supported on UWP, but at least version 2.7.1 will not compile, as CreateFileA seams not to be supported on that platform.

d-frey commented 5 years ago

We would certainly consider supporting it if the necessary changes are reasonable. The questions I have (as a non-Windows developer):

We would appreciate PRs for the above points. :)

jedelbo commented 5 years ago

I am not a Windows developer either. However it seemed that only a small change was needed. I am not sure how to actually test it (All tests passed, but I don't think the modified code was exercised).

d-frey commented 5 years ago

I think we have some tests reading files with the file_input, which should trigger the code modified by this PR. The only thing missing now is CI, if you could find out whether CMake has direct support for building UWP-compatible projects or, as a fallback, if there is a command-line switch for MSVC, I'd appreciate another PR.

jedelbo commented 5 years ago

@d-frey You can generate UWP projects with CMake by using -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.

d-frey commented 5 years ago

OK, thanks. I've just committed a new .appveyor.yml, lets see if it works. If it does, I assume that UWP can be used in general to ensure compatibility with all Windows-based platforms, but we still need to check if this interacts with Conan somehow.

@uilianries Do you know if this will influence the packages we are building? As far as I can see the current jobs only ensure that packages can be build, but they are not (automatically) uploaded somewhere, correct?

uilianries commented 5 years ago

@d-frey it's not a problem for us. They are uploaded, but only when a tag is created. As PEGTL is header-only, it will not influence the package. Anyone will be able to install PEGTL and manipulate any cmake definition if wanted.

d-frey commented 5 years ago

@uilianries OK, thanks for checking!

d-frey commented 5 years ago

It compiles with UWP flags, but the tests don't execute properly. Does anyone have an idea why, and how to fix this?

jedelbo commented 5 years ago

UWP support must be installed on the build machine.