aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2016-04-15 01:11:19 +0900
committerkinichiro <kinichiro.inoguchi@gmail>2016-04-15 01:47:20 +0900
commit08089a1b20a1818538670d641242266ed3185814 (patch)
tree8c7b29a220d43f047bed6c3343ea89b460f5a6e4
parentc94670a8cd39f8a8843e9adba2a6030adb00ac94 (diff)
downloadportable-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.txt15
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")
45endif() 45endif()
46 46
47if(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")
53endif()
54
47add_definitions(-DLIBRESSL_INTERNAL) 55add_definitions(-DLIBRESSL_INTERNAL)
48add_definitions(-DOPENSSL_NO_HW_PADLOCK) 56add_definitions(-DOPENSSL_NO_HW_PADLOCK)
49 57
@@ -202,6 +210,9 @@ endif()
202if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") 210if(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
203 set(OPENSSL_LIBS ${OPENSSL_LIBS} pthread) 211 set(OPENSSL_LIBS ${OPENSSL_LIBS} pthread)
204endif() 212endif()
213if(CMAKE_SYSTEM_NAME MATCHES "SunOS")
214 set(OPENSSL_LIBS ${OPENSSL_LIBS} nsl socket)
215endif()
205 216
206if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|MINGW|CYGWIN)" OR MSVC)) 217if(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()
210check_type_size(time_t SIZEOF_TIME_T) 221check_type_size(time_t SIZEOF_TIME_T)
211if(SIZEOF_TIME_T STREQUAL "4") 222if(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")
215endif() 226endif()
216add_definitions(-DSIZEOF_TIME_T=${SIZEOF_TIME_T}) 227add_definitions(-DSIZEOF_TIME_T=${SIZEOF_TIME_T})
217 228