Skip to content

Commit

Permalink
cmake/config: set HAVE_THREADS only if threads.h
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers committed Nov 16, 2023
1 parent a7a6c57 commit 9a580de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmake/re-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ else()
set(Backtrace_LIBRARIES)
endif()

check_function_exists(thrd_create HAVE_THREADS)
if(HAVE_THREADS)
check_function_exists(thrd_create HAVE_THREADS_FUN)
check_include_file(threads.h HAVE_THREADS_H)
if(HAVE_THREADS_FUN AND HAVE_THREADS_H)
list(APPEND RE_DEFINITIONS HAVE_THREADS)
endif()

Expand Down

0 comments on commit 9a580de

Please sign in to comment.