-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: disable pthreads on GTest project top-level when using MinGW #8
Conversation
in commit a634042 "Implement threading support for gtest on Windows", testing of internal threading in google test does not work on MinGW. The commit itself contains a comment indicating that pthreads is not to be used under MinGW due to > // On MinGW, we can have both GTEST_OS_WINDOWS and GTEST_HAS_PTHREAD > // defined, but we don't want to use MinGW's pthreads implementation which > // has conformance problems with some versions of the POSIX standard. The first comment on google#363 might indicate the reason for this breakage. This commit assures that pthreads is disabled on a top-level by cmake
Ok. There are some discussions going on regarding this issue. But as it has been broken since a year ago, I thought it might be nice to have a workaround in hunter until it has been fixed in upstream. |
In Hunter for MinGW toolchain used previous version of GTest that works fine: https://ci.appveyor.com/project/ingenue/hunter/build/1.0.724
According to the comment used approach doesn't work for some version of MinGW so this is why patch not accepted as far as I understand. It should be fixed appropriately. |
The problem with the older version of GTest used in hunter, is that GMock is not available as far as I can see. |
@andoks Oh... I see. Fine, if you manage to create version that will not break current CI state of GTest I'm okay with merging it.
Though if you can work on appropriate patch and merge it upstream it's always better. |
Great! I'll try to get it past CI
I wholeheartedly agree. |
google#721 has been merged in GTest upstream, and should make by work-around obsolete. Note that I haven't tested it. |
I can close this one? |
I'll do it for you ;-) I created #9 to track when the fix is imported. Hope that's ok. |
in commit a634042 "Implement threading
support for gtest on Windows", testing of internal threading in google
test does not work on MinGW. The commit itself contains a comment
indicating that pthreads is not to be used under MinGW due to
The first comment on google#363 might indicate the reason for this breakage.
This commit assures that pthreads is disabled on a top-level by cmake