From a0e7fb50ac15d3135f0146419319fd4fd31b7334 Mon Sep 17 00:00:00 2001 From: Andrew Buss Date: Mon, 21 Dec 2015 02:20:01 -0800 Subject: [PATCH] Fix CMake warning about CMP0054 by unquoting instances of HOST See CMake v3.1 policy CMP0054. * CMakeLists.txt: Use HOST variable without quotes. --- CMakeLists.txt | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff3e9efa..43a46131 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,59 +86,59 @@ MESSAGE("HOST = ${HOST}") #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") ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") SET(SRC ${SRC} thread_local_alloc.c) 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") #FIXME openbsd_threads=true 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") ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") ADD_DEFINITIONS("-DUSE_COMPILER_TLS") SET(SRC ${SRC} thread_local_alloc.c) ENDIF() - IF ( "HOST" MATCHES .*-.*-gnu.*) + IF ( HOST MATCHES .*-.*-gnu.*) ADD_DEFINITIONS("-DGC_GNU_THREADS") ADD_DEFINITIONS("-D_REENTRANT") ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") SET(SRC ${SRC} thread_local_alloc.c) 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") SET(SRC ${SRC} thread_local_alloc.c) @@ -149,15 +149,15 @@ IF(CMAKE_USE_PTHREADS_INIT) # 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") ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") SET(SRC ${SRC} thread_local_alloc.c win32_threads.c) 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.") @@ -165,7 +165,7 @@ IF(CMAKE_USE_PTHREADS_INIT) #TODO #darwin_threads=true ENDIF() - IF ( "HOST" MATCHES .*-.*-osf*) + IF ( HOST MATCHES .*-.*-osf*) ADD_DEFINITIONS("-DGC_OSF1_THREADS") IF(enable_parallel_mark) ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC") @@ -175,7 +175,7 @@ IF(CMAKE_USE_PTHREADS_INIT) # 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() -- 2.40.0