#TODO check cmake detection
IF(CMAKE_USE_PTHREADS_INIT)
SET(SRC ${SRC} pthread_start.c pthread_support.c pthread_stop_world.c)
- IF( "HOST" MATCHES x86-.*-linux.*|ia64-.*-linux.*|i586-.*-linux.*|i686-.*-linux.*|x86_64-.*-linux.*|alpha-.*-linux.*|sparc.*-.*-linux.*)
+ IF( HOST MATCHES x86-.*-linux.*|ia64-.*-linux.*|i586-.*-linux.*|i686-.*-linux.*|x86_64-.*-linux.*|alpha-.*-linux.*|sparc.*-.*-linux.*)
ADD_DEFINITIONS("-DGC_LINUX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
IF (${enable_parallel_mark})
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
MESSAGE("Explicit GC_INIT() calls may be required.")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-linux.*)
+ IF ( HOST MATCHES .*-.*-linux.*)
ADD_DEFINITIONS("-DGC_LINUX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-aix.*)
+ IF ( HOST MATCHES .*-.*-aix.*)
ADD_DEFINITIONS("-DGC_AIX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-hpux11.*)
+ IF ( HOST MATCHES .*-.*-hpux11.*)
MESSAGE("Only HP/UX 11 POSIX threads are supported.")
ADD_DEFINITIONS("-DGC_HPUX_THREADS")
ADD_DEFINITIONS("-D_POSIX_C_SOURCE=199506L") #TODO test -DVAR=value. Alternative is COMPILE_DEFINITIONS property
MESSAGE("Explicit GC_INIT() calls may be required.")
ADD_DEFINITIONS("-D_REENTRANT") #TODO
ENDIF()
- IF ( "HOST" MATCHES .*-.*-hpux10.*)
+ IF ( HOST MATCHES .*-.*-hpux10.*)
MESSAGE("Only HP/UX 11 POSIX threads are supported.")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-openbsd.*)
+ IF ( HOST MATCHES .*-.*-openbsd.*)
ADD_DEFINITIONS("-DGC_OPENBSD_THREADS")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-freebsd.*)
+ IF ( HOST MATCHES .*-.*-freebsd.*)
MESSAGE("FreeBSD does not yet fully support threads with Boehm GC.")
ADD_DEFINITIONS("-DGC_FREEBSD_THREADS")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-kfreebsd.*-gnu)
+ IF ( HOST MATCHES .*-.*-kfreebsd.*-gnu)
ADD_DEFINITIONS("-DGC_FREEBSD_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
IF (${enable_parallel_mark})
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
ADD_DEFINITIONS("-DUSE_COMPILER_TLS")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-gnu.*)
+ IF ( HOST MATCHES .*-.*-gnu.*)
ADD_DEFINITIONS("-DGC_GNU_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-netbsd.*)
+ IF ( HOST MATCHES .*-.*-netbsd.*)
MESSAGE("Only on NetBSD 2.0 or later.")
ADD_DEFINITIONS("-DGC_NETBSD_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
ADD_DEFINITIONS("-D_PTHREADS")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-solaris.*)
+ IF ( HOST MATCHES .*-.*-solaris.*)
ADD_DEFINITIONS("-DGC_SOLARIS_THREADS")
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
#TODO
# fi
ENDIF()
- IF ( "HOST" MATCHES .*-.*-irix.*)
+ IF ( HOST MATCHES .*-.*-irix.*)
ADD_DEFINITIONS("-DGC_IRIX_THREADS")
ENDIF()
- IF ( "HOST" MATCHES .*-.*-cygwin.*)
+ IF ( HOST MATCHES .*-.*-cygwin.*)
ADD_DEFINITIONS("-DGC_THREADS")
IF (${enable_parallel_mark})
ADD_DEFINITIONS("-DPARALLEL_MARK")
#TODO
# win32_threads=true
ENDIF()
- IF ( "HOST" MATCHES .*-.*-darwin.*)
+ IF ( HOST MATCHES .*-.*-darwin.*)
ADD_DEFINITIONS("-DGC_DARWIN_THREADS")
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
MESSAGE("Explicit GC_INIT() calls may be required.")
#TODO
#darwin_threads=true
ENDIF()
- IF ( "HOST" MATCHES .*-.*-osf*)
+ IF ( HOST MATCHES .*-.*-osf*)
ADD_DEFINITIONS("-DGC_OSF1_THREADS")
IF (${enable_parallel_mark})
ADD_DEFINITIONS("-DPARALLEL_MARK")
# Measurements haven't yet been done.
ENDIF()
ENDIF()
- IF ( "HOST" MATCHES .*-.*-linux.*)
+ IF ( HOST MATCHES .*-.*-linux.*)
ADD_DEFINITIONS("-DGC_LINUX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
ENDIF()