-
Notifications
You must be signed in to change notification settings - Fork 252
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
Fixup for finding pthread.h in CMake #2156
Conversation
Sadly not:
btw, is pthreads completely optional? |
Yes, pthreads is optional, but I would like to avoid too many branches in CMake, so I would like to keep it mandatory in CMake. How do you proceed for other projects with your devel-Windows-thing for pthreads? |
I don't know - it's my first time as well and I'm honestly a bit confused by all the different pthreads ;-) So I would welcome if it could be made completely optional also for cmake. |
unset(PThreads_LIBRARIES) | ||
unset(PThreads_INCLUDE_DIRS) |
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.
What works for me is
find_path(PThreads_INCLUDE_DIRS NAMES pthread.h )
find_library(PThreads_LIBRARIES NAMES libwinpthread.dll pthreads libpthreads pthread)
instead of line 138 to 144 (i.e. without the HAVE_PTHREAD_H
check, which I think is made obsolete by the find_path
).
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.
Please make a code suggestion.
See #2171 |
Closing in favor of #2171. |
@tobiasdiez please check if this works.