diff --git a/cmake/re-config.cmake b/cmake/re-config.cmake index ba50406ff..a6c8af195 100644 --- a/cmake/re-config.cmake +++ b/cmake/re-config.cmake @@ -70,7 +70,9 @@ endif() check_function_exists(thrd_create HAVE_THREADS_FUN) check_include_file(threads.h HAVE_THREADS_H) if(HAVE_THREADS_FUN AND HAVE_THREADS_H) - set(HAVE_THREADS true) + set(HAVE_THREADS CACHE BOOL true) +endif() +if(HAVE_THREADS) list(APPEND RE_DEFINITIONS HAVE_THREADS) endif()