diff options
| author | kinichiro <kinichiro.inoguchi@gmail.com> | 2016-04-15 01:11:19 +0900 |
|---|---|---|
| committer | kinichiro <kinichiro.inoguchi@gmail> | 2016-04-15 01:47:20 +0900 |
| commit | 08089a1b20a1818538670d641242266ed3185814 (patch) | |
| tree | 8c7b29a220d43f047bed6c3343ea89b460f5a6e4 | |
| parent | c94670a8cd39f8a8843e9adba2a6030adb00ac94 (diff) | |
| download | portable-08089a1b20a1818538670d641242266ed3185814.tar.gz portable-08089a1b20a1818538670d641242266ed3185814.tar.bz2 portable-08089a1b20a1818538670d641242266ed3185814.zip | |
fix cmake on Solaris
- add Solaris specific compiler flags and library
- merge message when SMALL_TIME_T is true
- confirmed on SunOS Release 5.11 Version 11.3 64-bit Solaris i386
| -rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e12909..447c3f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -44,6 +44,14 @@ if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") | |||
| 44 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT") | 44 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT") |
| 45 | endif() | 45 | endif() |
| 46 | 46 | ||
| 47 | if(CMAKE_SYSTEM_NAME MATCHES "SunOS") | ||
| 48 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=gnu99 -fno-strict-aliasing") | ||
| 49 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__EXTENSIONS__") | ||
| 50 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600") | ||
| 51 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBSD_COMP") | ||
| 52 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -m64") | ||
| 53 | endif() | ||
| 54 | |||
| 47 | add_definitions(-DLIBRESSL_INTERNAL) | 55 | add_definitions(-DLIBRESSL_INTERNAL) |
| 48 | add_definitions(-DOPENSSL_NO_HW_PADLOCK) | 56 | add_definitions(-DOPENSSL_NO_HW_PADLOCK) |
| 49 | 57 | ||
| @@ -202,6 +210,9 @@ endif() | |||
| 202 | if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") | 210 | if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") |
| 203 | set(OPENSSL_LIBS ${OPENSSL_LIBS} pthread) | 211 | set(OPENSSL_LIBS ${OPENSSL_LIBS} pthread) |
| 204 | endif() | 212 | endif() |
| 213 | if(CMAKE_SYSTEM_NAME MATCHES "SunOS") | ||
| 214 | set(OPENSSL_LIBS ${OPENSSL_LIBS} nsl socket) | ||
| 215 | endif() | ||
| 205 | 216 | ||
| 206 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|MINGW|CYGWIN)" OR MSVC)) | 217 | if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|MINGW|CYGWIN)" OR MSVC)) |
| 207 | set(BUILD_SHARED true) | 218 | set(BUILD_SHARED true) |
| @@ -210,8 +221,8 @@ endif() | |||
| 210 | check_type_size(time_t SIZEOF_TIME_T) | 221 | check_type_size(time_t SIZEOF_TIME_T) |
| 211 | if(SIZEOF_TIME_T STREQUAL "4") | 222 | if(SIZEOF_TIME_T STREQUAL "4") |
| 212 | set(SMALL_TIME_T true) | 223 | set(SMALL_TIME_T true) |
| 213 | message(WARNING " ** Warning, this system is unable to represent times past 2038") | 224 | message(WARNING " ** Warning, this system is unable to represent times past 2038\n" |
| 214 | message(WARNING " ** It will behave incorrectly when handling valid RFC5280 dates") | 225 | " ** It will behave incorrectly when handling valid RFC5280 dates") |
| 215 | endif() | 226 | endif() |
| 216 | add_definitions(-DSIZEOF_TIME_T=${SIZEOF_TIME_T}) | 227 | add_definitions(-DSIZEOF_TIME_T=${SIZEOF_TIME_T}) |
| 217 | 228 | ||
