Skip to content

Commit

Permalink
Prefer Windows threads on Win32 builds (over C11) for now
Browse files Browse the repository at this point in the history
Signed-off-by: Quincey Koziol <[email protected]>
  • Loading branch information
qkoziol committed Apr 11, 2024
1 parent 232c6de commit 0842e56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,12 @@ if (Threads_FOUND)

# Determine which threading package to use
CHECK_INCLUDE_FILE("threads.h" HAVE_THREADS_H)
if (HAVE_THREADS_H)
# When C11 threads are available, those are the top choice
set (H5_HAVE_C11_THREADS 1)
elseif (WIN32)
if (WIN32)
# When Win32 is available, we use those threads
set (H5_HAVE_WIN_THREADS 1)
elseif (HAVE_THREADS_H)
# When C11 threads are available, those are the top choice
set (H5_HAVE_C11_THREADS 1)
else ()
if (NOT H5_HAVE_PTHREAD_H)
message (FATAL_ERROR " **** thread support requires C11 threads, Win32 threads or Pthreads **** ")
Expand Down
8 changes: 4 additions & 4 deletions HDF5Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ if (Threads_FOUND)

# Determine which threading package to use
CHECK_INCLUDE_FILE("threads.h" HAVE_THREADS_H)
if (HAVE_THREADS_H)
# When C11 threads are available, those are the top choice
set (H5_HAVE_C11_THREADS 1)
elseif (WIN32)
if (WIN32)
# When Win32 is available, we use those threads
set (H5_HAVE_WIN_THREADS 1)
elseif (HAVE_THREADS_H)
# When C11 threads are available, those are the top choice
set (H5_HAVE_C11_THREADS 1)
else ()
if (NOT H5_HAVE_PTHREAD_H)
message (FATAL_ERROR " **** thread support requires C11 threads, Win32 threads or Pthreads **** ")
Expand Down

0 comments on commit 0842e56

Please sign in to comment.