From: Martin Quinson Date: Tue, 28 Jul 2015 14:31:31 +0000 (+0200) Subject: pthread is mandatory X-Git-Tag: v3_12~347 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f1725fc7f2cae4669173baac721b6bf299c85dc5 pthread is mandatory --- diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 52aef28cb1..0c3c2840e9 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -146,7 +146,12 @@ endif() # Checks for header libraries functions. CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_DLOPEN_IN_LIBDL) CHECK_LIBRARY_EXISTS(execinfo backtrace "" HAVE_BACKTRACE_IN_LIBEXECINFO) -CHECK_LIBRARY_EXISTS(pthread pthread_create "" pthread) +CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD) + +if (NOT HAVE_PTHREAD) + message(FATAL_ERROR "You must have a working pthread installation to proceed.") +endif() + CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB) CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB) CHECK_LIBRARY_EXISTS(pthread sem_timedwait "" HAVE_SEM_TIMEDWAIT_LIB)