add MXE cross-compilation support with pthread and gettimeofda…#389
Closed
hank5000 wants to merge 1 commit into
Closed
add MXE cross-compilation support with pthread and gettimeofda…#389hank5000 wants to merge 1 commit into
hank5000 wants to merge 1 commit into
Conversation
christian-rauch
left a comment
Collaborator
There was a problem hiding this comment.
Can you provide more context what MXE is and why these changes are required? Is it possible to add this to the CI pipeline in order to check that this "MXE support" does not break in future?
Comment on lines
+13
to
+17
| check_include_file(pthread.h HAVE_PTHREAD) | ||
| if(HAVE_PTHREAD) | ||
| add_definitions(-DHAVE_PTHREAD) | ||
| message(STATUS "pthread.h found, using POSIX thread support") | ||
| endif() |
Collaborator
There was a problem hiding this comment.
Can you not use FindThreads and evaluate Threads_FOUND here?
| typedef long long suseconds_t; | ||
| #endif | ||
|
|
||
|
|
Comment on lines
34
to
42
|
|
||
| #ifdef _WIN32 | ||
| #if defined(_WIN32) | ||
| #if !defined(HAVE_SYS_TIME_H) | ||
| #include <Winsock2.h> | ||
| #endif | ||
|
|
||
| #include <windows.h> | ||
| #define sleep(x) Sleep((x)*1000) | ||
| typedef long long suseconds_t; | ||
| #endif |
Collaborator
There was a problem hiding this comment.
Is this related to pthread? Maybe place this in a separate commit if it is an unrelated change.
Collaborator
|
@hank5000 Is this PR still relevant? Can you have a look at this and address the comments, or close the PR if you don't need this any more? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CheckIncludeFileto detect presence of pthread.h and sys/time.h