Skip to content

Commit

Permalink
cmake: Allow to build with MinGW POSIX threads.
Browse files Browse the repository at this point in the history
Win32 threads are still preferable, but MPOSIX threads seems to be
getting more prevalent among some Linux distros.

Fixes apitrace#750
  • Loading branch information
jrfonseca committed Jul 8, 2021
1 parent 0001ff6 commit cb3a85c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ if (MINGW)
ERROR_QUIET
)
if (NOT STATUS_CXX11_THREADS EQUAL 0)
message (SEND_ERROR "MinGW builds require WIN32 threads.")
message (WARNING "MinGW with POSIX threads detected; Win32 threads recommended.")
else ()
# TODO: Consider https://github.com/meganz/mingw-std-threads
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/compat/cxx11-threads)
Expand Down
1 change: 1 addition & 0 deletions compat/winsdk_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <iostream>
#include <memory>
#include <vector>
#include <thread>
#endif


Expand Down

0 comments on commit cb3a85c

Please sign in to comment.