Untitled

From ivaat, 4 Months ago, written in Plain Text, viewed 1 times. This paste will slip away in 1 Second.
URL https://paste.ovh/view/42537aa0 Embed
Download Paste or View Raw
  1.  cat cmake/os/SunOS.cmake
  2. # Copyright (c) 2010, 2022, Oracle and/or its affiliates.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License, version 2.0,
  6. # as published by the Free Software Foundation.
  7. #
  8. # This program is also distributed with certain software (including
  9. # but not limited to OpenSSL) that is licensed under separate terms,
  10. # as designated in a particular file or component or in included license
  11. # documentation.  The authors of MySQL hereby grant you an additional
  12. # permission to link the program and your derivative works with the
  13. # separately licensed software that they have included with MySQL.
  14. #
  15. # This program is distributed in the hope that it will be useful,
  16. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. # GNU General Public License, version 2.0, for more details.
  19. #
  20. # You should have received a copy of the GNU General Public License
  21. # along with this program; if not, write to the Free Software
  22. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
  23.  
  24. INCLUDE(CheckSymbolExists)
  25. INCLUDE(CheckCSourceRuns)
  26. INCLUDE(CheckCSourceCompiles)
  27. INCLUDE(CheckCXXSourceCompiles)
  28.  
  29. #IF(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
  30. #  SET(SOLARIS_SPARC 1)
  31. #ELSE()
  32. #  MESSAGE(FATAL_ERROR "Solaris on Intel is not supported.")
  33. #ENDIF()
  34.  
  35. IF("${CMAKE_C_FLAGS}${CMAKE_CXX_FLAGS}" MATCHES "-m32")
  36.   MESSAGE(FATAL_ERROR "32bit build not supported on Solaris.")
  37. ENDIF()
  38.  
  39. IF(NOT "${CMAKE_C_FLAGS}" MATCHES  "-m64")
  40.   STRING_APPEND(CMAKE_C_FLAGS      " -m64")
  41. ENDIF()
  42. IF(NOT "{CMAKE_CXX_FLAGS}" MATCHES "-m64")
  43.   STRING_APPEND(CMAKE_CXX_FLAGS    " -m64")
  44. ENDIF()
  45.  
  46. STRING_APPEND(CMAKE_C_LINK_FLAGS   " -m64")
  47. STRING_APPEND(CMAKE_CXX_LINK_FLAGS " -m64")
  48.  
  49. # We require at least SunStudio 12.6 (CC 5.15)
  50. #IF(NOT FORCE_UNSUPPORTED_COMPILER)
  51. # IF(MY_COMPILER_IS_SUNPRO)
  52. #   MESSAGE(FATAL_ERROR "Oracle Studio is not supported.")
  53. # ELSEIF(MY_COMPILER_IS_CLANG)
  54. #   MESSAGE(WARNING "Clang is experimental!!")
  55. #  ELSEIF(MY_COMPILER_IS_GNU)
  56.     # 9.2.0 generated code which dumped core in optimized mode.
  57.     #IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.2)
  58.     #  MESSAGE(FATAL_ERROR "GCC 10.2 or newer is required")
  59.     #ENDIF()
  60.     #ELSE()
  61.     #MESSAGE(FATAL_ERROR "Unsupported compiler!")
  62.     # ENDIF()
  63.     #ENDIF()
  64.  
  65. # Enable 64 bit file offsets
  66. ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
  67.  
  68. # Enable general POSIX extensions. See standards(5) man page.
  69. ADD_DEFINITIONS(-D__EXTENSIONS__)
  70.  
  71. # Solaris threads with POSIX semantics:
  72. # http://docs.oracle.com/cd/E19455-01/806-5257/6je9h033k/index.html
  73. ADD_DEFINITIONS(-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_PTHREADS)
  74.  
  75. # CMake defined -lthread as thread flag. This crashes in dlopen
  76. # when trying to load plugins workaround with -lpthread
  77. SET(CMAKE_THREAD_LIBS_INIT -lpthread CACHE INTERNAL "" FORCE)
  78.  
  79. # Solaris specific large page support
  80. CHECK_SYMBOL_EXISTS(MHA_MAPSIZE_VA sys/mman.h  HAVE_SOLARIS_LARGE_PAGES)
  81.  
  82. SET(LINK_FLAG_Z_DEFS "-z,defs")
  83.  

Reply to "Untitled"

Here you can reply to the paste above

captcha