Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change yes value to 1 value.
[simgrid.git] / buildtools / Cmake / src / CMakeCompleteInFiles.txt
index c86b245..d971ebd 100644 (file)
@@ -17,7 +17,6 @@ CHECK_LIBRARY_EXISTS(rt       clock_gettime           NO_DEFAULT_PATHS HAVE_POSIX_GETTIME)
 CHECK_INCLUDE_FILES("time.h;sys/time.h" TIME_WITH_SYS_TIME)
 CHECK_INCLUDE_FILES("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
 CHECK_INCLUDE_FILE(pthread.h HAVE_PTHREAD_H)
-CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
 CHECK_INCLUDE_FILE(valgrind/valgrind.h HAVE_VALGRIND_VALGRIND_H)
 CHECK_INCLUDE_FILE(socket.h HAVE_SOCKET_H)
 CHECK_INCLUDE_FILE(sys/socket.h HAVE_SYS_SOCKET_H)
@@ -128,12 +127,12 @@ endif(disable_gtnets)
 ### Initialize of CONTEXT THREADS
 
 if(pthread)
-set(pthread "yes")
+set(pthread 1)
 elseif(pthread)
-set(pthread "no")
+set(pthread 0)
 endif(pthread)
 
-if(pthread MATCHES "yes")
+if(pthread)
        ### HAVE_SEM_INIT
        
        if(HAVE_SEM_INIT_LIB)
@@ -166,7 +165,7 @@ if(pthread MATCHES "yes")
                        set(HAVE_MUTEX_TIMEDLOCK 1)
                endif(HAVE_MUTEX_TIMEDLOCK_run)
        endif(HAVE_MUTEX_TIMEDLOCK_LIB)
-endif(pthread MATCHES "yes")
+endif(pthread)
 
 # AC_CHECK_MCSC(mcsc=yes, mcsc=no) 
 set(mcsc_flags "")
@@ -186,14 +185,14 @@ elseif(mcsc MATCHES "yes")
        set(mcsc "no")
 endif(mcsc MATCHES "yes")
 
-if(mcsc MATCHES "no" AND pthread MATCHES "no")
+if(mcsc MATCHES "no" AND pthread)
        if(HAVE_WINDOWS_H)
                set(windows_context "yes")
                set(IS_WINDOWS 1)
        elseif(HAVE_WINDOWS_H)
                message(FATAL_ERROR "no appropriate backend found")
        endif(HAVE_WINDOWS_H)
-endif(mcsc MATCHES "no" AND pthread MATCHES "no")
+endif(mcsc MATCHES "no" AND pthread)
 
 if(with_context MATCHES "ucontext" AND mcsc MATCHES "no")
        message(FATAL_ERROR "-Dwith-context=ucontext specified but ucontext unusable.")
@@ -235,9 +234,9 @@ endif(with_context MATCHES "ucontext")
 
 if(with_context MATCHES "pthread")
        set(with_context_ok 1)
-       if(pthread MATCHES "no")
+       if(NOT pthread)
                message(FATAL_ERROR "Cannot find pthreads (try -Dwith_context=ucontext if you haven't already tried).")
-       endif(pthread MATCHES "no")
+       endif(NOT pthread)
        SET(CONTEXT_THREADS 1)
 endif(with_context MATCHES "pthread")