aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 12 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d90dabec..3eddfca0e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -294,11 +294,13 @@ add_definitions("-DBLOCKCHAIN_DB=${BLOCKCHAIN_DB}")
# Can't install hook in static build on OSX, because OSX linker does not support --wrap
# On ARM, having libunwind package (with .so's only) installed breaks static link.
+# When possible, avoid stack tracing using libunwind in favor of using easylogging++.
if (APPLE)
set(DEFAULT_STACK_TRACE OFF)
set(LIBUNWIND_LIBRARIES "")
elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT MINGW)
set(DEFAULT_STACK_TRACE ON)
+ set(STACK_TRACE_LIB "easylogging++") # for diag output only
set(LIBUNWIND_LIBRARIES "")
elseif (ARM AND STATIC)
set(DEFAULT_STACK_TRACE OFF)
@@ -307,6 +309,7 @@ else()
find_package(Libunwind)
if(LIBUNWIND_FOUND)
set(DEFAULT_STACK_TRACE ON)
+ set(STACK_TRACE_LIB "libunwind") # for diag output only
else()
set(DEFAULT_STACK_TRACE OFF)
set(LIBUNWIND_LIBRARIES "")
@@ -316,7 +319,7 @@ endif()
option(STACK_TRACE "Install a hook that dumps stack on exception" ${DEFAULT_STACK_TRACE})
if(STACK_TRACE)
- message(STATUS "Stack trace on exception enabled")
+ message(STATUS "Stack trace on exception enabled (using ${STACK_TRACE_LIB})")
else()
message(STATUS "Stack trace on exception disabled")
endif()
@@ -327,7 +330,7 @@ if (UNIX AND NOT APPLE)
find_package(Threads)
endif()
-# Handle OpenSSL, used for sha256sum on binary updates
+# Handle OpenSSL, used for sha256sum on binary updates and light wallet ssl http
if (APPLE AND NOT IOS)
if (NOT OpenSSL_DIR)
EXECUTE_PROCESS(COMMAND brew --prefix openssl
@@ -338,6 +341,8 @@ if (APPLE AND NOT IOS)
endif()
find_package(OpenSSL REQUIRED)
+message(STATUS "Using OpenSSL include dir at ${OPENSSL_INCLUDE_DIR}")
+include_directories(${OPENSSL_INCLUDE_DIR})
if(STATIC AND NOT IOS)
if(UNIX)
set(OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES};${CMAKE_DL_LIBS};${CMAKE_THREAD_LIBS_INIT}")
@@ -453,7 +458,11 @@ else()
option(NO_AES "Explicitly disable AES support" ${NO_AES})
- if(NOT NO_AES AND NOT ARM AND NOT PPC64LE)
+ if(NO_AES)
+ message(STATUS "AES support explicitly disabled")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_AES")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_AES")
+ elseif(NOT ARM AND NOT PPC64LE)
message(STATUS "AES support enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")