Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
do not even test pthread on windows
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 23 Jan 2016 20:53:29 +0000 (21:53 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 23 Jan 2016 20:53:32 +0000 (21:53 +0100)
This way, the Java library won't have any dependency on the
winpthread-1.dll library provided by mingw32-64.

Less dependencies, less problems.

CMakeLists.txt

index b6dc451fc7d1b3ee8bd7d1c7b3257688abce7f5a..5e19c961af3ea76725231d1ca9152f1e6d7f6a7e 100644 (file)
@@ -281,12 +281,14 @@ 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          "" HAVE_PTHREAD)
-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)
-CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB)
 CHECK_LIBRARY_EXISTS(rt      clock_gettime           "" HAVE_POSIX_GETTIME)
+if(NOT WIN32)
+  CHECK_LIBRARY_EXISTS(pthread pthread_create          "" HAVE_PTHREAD)
+  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)
+  CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB)
+endif()
 
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
   set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE")