Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
pthread is mandatory
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 28 Jul 2015 14:31:31 +0000 (16:31 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 28 Jul 2015 14:34:18 +0000 (16:34 +0200)
buildtools/Cmake/CompleteInFiles.cmake

index 52aef28..0c3c284 100644 (file)
@@ -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)