Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient

This commit is contained in:
Rolf Eike Beer 2014-04-11 18:27:01 +02:00
parent b0b4b4602f
commit 3a71d34cf3
4 changed files with 8 additions and 8 deletions

View File

@ -34,13 +34,13 @@ else()
endif() endif()
#silence duplicate symbol warnings on AIX #silence duplicate symbol warnings on AIX
if(CMAKE_SYSTEM MATCHES "AIX") if(CMAKE_SYSTEM_NAME MATCHES "AIX")
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
endif() endif()
endif() endif()
if(CMAKE_SYSTEM MATCHES "IRIX") if(CMAKE_SYSTEM_NAME MATCHES "IRIX")
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15")

View File

@ -31,10 +31,10 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
include(TestCXXAcceptsFlag) include(TestCXXAcceptsFlag)
set(CMAKE_TRY_ANSI_CXX_FLAGS "") 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") set(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std")
endif() endif()
if(CMAKE_SYSTEM MATCHES "OSF") if(CMAKE_SYSTEM_NAME MATCHES "OSF")
set(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname") set(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname")
endif() endif()
# if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see # if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see

View File

@ -41,7 +41,7 @@ set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET})
set(CMAKE_REQUIRED_QUIET ${Threads_FIND_QUIETLY}) set(CMAKE_REQUIRED_QUIET ${Threads_FIND_QUIETLY})
# Do we have sproc? # 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) CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H)
endif() endif()
@ -138,13 +138,13 @@ if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_CREATE)
set(Threads_FOUND TRUE) set(Threads_FOUND TRUE)
endif() endif()
if(CMAKE_SYSTEM MATCHES "Windows") if(CMAKE_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_USE_WIN32_THREADS_INIT 1) set(CMAKE_USE_WIN32_THREADS_INIT 1)
set(Threads_FOUND TRUE) set(Threads_FOUND TRUE)
endif() endif()
if(CMAKE_USE_PTHREADS_INIT) 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 # Use libcma if it exists and can be used. It provides more
# symbols than the plain pthread library. CMA threads # symbols than the plain pthread library. CMA threads
# have actually been deprecated: # have actually been deprecated:

View File

@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.6)
project(SUBDIR) project(SUBDIR)
# Some systems do not seem to support rpath with spaces. # 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) set(CMAKE_SKIP_BUILD_RPATH 1)
endif() endif()