Skip to content

Commit

Permalink
cmake: Update pthreads detection.
Browse files Browse the repository at this point in the history
gthread now seems to support win32 threads and _GLIBCXX_HAS_GTHREADS is
always defined.

Detect through _GLIBCXX_GCC_GTHR_POSIX_H instead.
  • Loading branch information
jrfonseca committed Aug 31, 2024
1 parent 104a819 commit 8adada2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ include (StaticCRT)
# use those features.
# https://github.com/jrfonseca/drmingw/issues/82#issuecomment-1360081041
execute_process (
COMMAND "${CMAKE_COMMAND}" -E echo "#include <thread>\n#ifdef _GLIBCXX_HAS_GTHREADS\n#error _GLIBCXX_HAS_GTHREADS\n#endif"
COMMAND "${CMAKE_COMMAND}" -E echo "#include <thread>\n#ifdef _GLIBCXX_GCC_GTHR_POSIX_H\n#error _GLIBCXX_GCC_GTHR_POSIX_H\n#endif"
COMMAND "${CMAKE_CXX_COMPILER}" -x c++ -E -
RESULT_VARIABLE STATUS_CXX11_THREADS
OUTPUT_QUIET
Expand Down

0 comments on commit 8adada2

Please sign in to comment.