From 3a71d34cf3a10ee215ae3899acafd29551ba6e7e Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Fri, 11 Apr 2014 18:27:01 +0200 Subject: Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient --- CompileFlags.cmake | 4 ++-- Modules/CMakeBackwardCompatibilityCXX.cmake | 4 ++-- Modules/FindThreads.cmake | 6 +++--- Tests/SubDirSpaces/CMakeLists.txt | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CompileFlags.cmake b/CompileFlags.cmake index a6ff8e0..5f6a099 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -34,13 +34,13 @@ else() endif() #silence duplicate symbol warnings on AIX -if(CMAKE_SYSTEM MATCHES "AIX") +if(CMAKE_SYSTEM_NAME MATCHES "AIX") if(NOT CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ") endif() endif() -if(CMAKE_SYSTEM MATCHES "IRIX") +if(CMAKE_SYSTEM_NAME MATCHES "IRIX") if(NOT CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15") diff --git a/Modules/CMakeBackwardCompatibilityCXX.cmake b/Modules/CMakeBackwardCompatibilityCXX.cmake index a3da2d6..94a94ee 100644 --- a/Modules/CMakeBackwardCompatibilityCXX.cmake +++ b/Modules/CMakeBackwardCompatibilityCXX.cmake @@ -31,10 +31,10 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) if(NOT CMAKE_COMPILER_IS_GNUCXX) include(TestCXXAcceptsFlag) set(CMAKE_TRY_ANSI_CXX_FLAGS "") - if(CMAKE_SYSTEM MATCHES "IRIX") + if(CMAKE_SYSTEM_NAME MATCHES "IRIX") set(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std") endif() - if(CMAKE_SYSTEM MATCHES "OSF") + if(CMAKE_SYSTEM_NAME MATCHES "OSF") set(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname") endif() # if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index b5cc67f..6050dcd 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -41,7 +41,7 @@ set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) set(CMAKE_REQUIRED_QUIET ${Threads_FIND_QUIETLY}) # Do we have sproc? -if(CMAKE_SYSTEM MATCHES IRIX AND NOT CMAKE_THREAD_PREFER_PTHREAD) +if(CMAKE_SYSTEM_NAME MATCHES IRIX AND NOT CMAKE_THREAD_PREFER_PTHREAD) CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H) endif() @@ -138,13 +138,13 @@ if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_CREATE) set(Threads_FOUND TRUE) endif() -if(CMAKE_SYSTEM MATCHES "Windows") +if(CMAKE_SYSTEM_NAME MATCHES "Windows") set(CMAKE_USE_WIN32_THREADS_INIT 1) set(Threads_FOUND TRUE) endif() if(CMAKE_USE_PTHREADS_INIT) - if(CMAKE_SYSTEM MATCHES "HP-UX-*") + if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") # Use libcma if it exists and can be used. It provides more # symbols than the plain pthread library. CMA threads # have actually been deprecated: diff --git a/Tests/SubDirSpaces/CMakeLists.txt b/Tests/SubDirSpaces/CMakeLists.txt index 69f1d68..40c265e 100644 --- a/Tests/SubDirSpaces/CMakeLists.txt +++ b/Tests/SubDirSpaces/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.6) project(SUBDIR) # Some systems do not seem to support rpath with spaces. -if("${CMAKE_SYSTEM}" MATCHES "IRIX|QNX") +if(CMAKE_SYSTEM_NAME MATCHES "IRIX|QNX") set(CMAKE_SKIP_BUILD_RPATH 1) endif() -- cgit v0.12