aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2016-04-08 15:09:07 +0900
committerkinichiro <kinichiro.inoguchi@gmail.com>2016-04-08 15:09:07 +0900
commite1f8a1e160be5cda14986e75a00b7d5f5ca87225 (patch)
treedb0d454b3c2890e13427cdcb767cc81cd9dc87f4 /CMakeLists.txt
parent8131b377bffdacb8789c78ef31160b3bf4ee054b (diff)
downloadportable-e1f8a1e160be5cda14986e75a00b7d5f5ca87225.tar.gz
portable-e1f8a1e160be5cda14986e75a00b7d5f5ca87225.tar.bz2
portable-e1f8a1e160be5cda14986e75a00b7d5f5ca87225.zip
modify cmake to build ASM
- add functionality compiling ASM with cmake - to enable ASM, `cmake -DENABLE_ASM=on ..`
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 710d8a9..8ab76ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,6 @@ endif()
35 35
36add_definitions(-DLIBRESSL_INTERNAL) 36add_definitions(-DLIBRESSL_INTERNAL)
37add_definitions(-DOPENSSL_NO_HW_PADLOCK) 37add_definitions(-DOPENSSL_NO_HW_PADLOCK)
38add_definitions(-DOPENSSL_NO_ASM)
39 38
40set(CMAKE_POSITION_INDEPENDENT_CODE true) 39set(CMAKE_POSITION_INDEPENDENT_CODE true)
41 40
@@ -161,6 +160,14 @@ if(HAVE_ERR_H)
161 add_definitions(-DHAVE_ERR_H) 160 add_definitions(-DHAVE_ERR_H)
162endif() 161endif()
163 162
163if("${CMAKE_C_COMPILER_ABI}" STREQUAL "ELF" AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND ENABLE_ASM)
164 set(HOST_ASM_ELF_X86_64 true)
165endif()
166
167if(APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND ENABLE_ASM)
168 set(HOST_ASM_MACOSX_X86_64 true)
169endif()
170
164set(OPENSSL_LIBS ssl crypto) 171set(OPENSSL_LIBS ssl crypto)
165if(CMAKE_HOST_WIN32) 172if(CMAKE_HOST_WIN32)
166 set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32) 173 set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32)