Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Universal Windows Platform support #558

Merged
merged 4 commits into from
Dec 21, 2021

Conversation

isaevil
Copy link
Contributor

@isaevil isaevil commented Dec 3, 2021

Support compilation with Universal Windows Platform by fixing compilation errors like these:

doctest.h(4272): error C3861: 'SetThreadStackGuarantee': identifier not found
doctest.h(4305): error C2065: 'SEM_FAILCRITICALERRORS': undeclared identifier
doctest.h(4305): error C2065: 'SEM_NOALIGNMENTFAULTEXCEPT': undeclared identifier
doctest.h(4306): error C2065: 'SEM_NOGPFAULTERRORBOX': undeclared identifier
doctest.h(4306): error C2065: 'SEM_NOOPENFILEERRORBOX': undeclared identifier
doctest.h(4324): error C3861: 'SetThreadStackGuarantee': identifier not found

@onqtam
Copy link
Member

onqtam commented Dec 8, 2021

I think a cleaner way to do this would be to add the follownig:

#ifdef WINAPI_FAMILY
#define DOCTEST_CONFIG_NO_WINDOWS_SEH
#endif // WINAPI_FAMILY

in doctest_fwd.h - right around line 230 before #if DOCTEST_MSVC && !defined(DOCTEST_CONFIG_WINDOWS_SEH) - along with a comment.

I'm not familiar at all with WINAPI_FAMILY and the relations with WINAPI_FAMILY_APP & WINAPI_FAMILY_PHONE_APP & WINAPI_PARTITION_DESKTOP, but there are such checks already in doctest.cpp (#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) which are specific - much better than something as broad as WINAPI_FAMILY.

And btw thanks for the contributions - even though I request changes in each and every single of your PRs - more compiler/platform support is welcome!

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
@isaevil isaevil force-pushed the isaevil/uwp-support branch from 3d0ac6b to 13e3d4e Compare December 16, 2021 10:08
@isaevil
Copy link
Contributor Author

isaevil commented Dec 16, 2021

I think a cleaner way to do this would be to add the follownig:

#ifdef WINAPI_FAMILY
#define DOCTEST_CONFIG_NO_WINDOWS_SEH
#endif // WINAPI_FAMILY

in doctest_fwd.h - right around line 230 before #if DOCTEST_MSVC && !defined(DOCTEST_CONFIG_WINDOWS_SEH) - along with a comment.

I'm not familiar at all with WINAPI_FAMILY and the relations with WINAPI_FAMILY_APP & WINAPI_FAMILY_PHONE_APP & WINAPI_PARTITION_DESKTOP, but there are such checks already in doctest.cpp (#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) which are specific - much better than something as broad as WINAPI_FAMILY.

And btw thanks for the contributions - even though I request changes in each and every single of your PRs - more compiler/platform support is welcome!

I guess this check you mentioned #if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) is actually applicable here too because as I can see we define /DWINAPI_FAMILY=WINAPI_FAMILY_APP in our project.

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
@onqtam onqtam merged commit fce9597 into doctest:dev Dec 21, 2021
@isaevil isaevil deleted the isaevil/uwp-support branch December 21, 2021 13:54
hurricane1026 pushed a commit to clapdb/doctest that referenced this pull request Nov 3, 2022
Add Universal Windows Platform Support
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants