diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-01-13 14:35:52 -0500 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-01-13 14:35:52 -0500 |
commit | 56c44b78b4ee35d207488bef30685a8856035612 (patch) | |
tree | 08cd49937cd95d47be4d6fb79c0a7dadd88ea775 | |
parent | Merge pull request #1545 (diff) | |
parent | Change logic of testing for libunwind on OSX and ARM (diff) | |
download | monero-56c44b78b4ee35d207488bef30685a8856035612.tar.xz |
Merge pull request #1548
e68ea86c Change logic of testing for libunwind on OSX and ARM (NanoAkron)
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e42cdb384..eea161bdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,14 +273,19 @@ endif() add_definitions("-DBLOCKCHAIN_DB=${BLOCKCHAIN_DB}") -find_package(Libunwind) # 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. -if(LIBUNWIND_FOUND AND NOT (STATIC AND (APPLE OR ARM))) - set(DEFAULT_STACK_TRACE ON) -else() +if(APPLE OR (ARM AND STATIC)) set(DEFAULT_STACK_TRACE OFF) set(LIBUNWIND_LIBRARIES "") +else() + find_package(Libunwind) + if(LIBUNWIND_FOUND) + set(DEFAULT_STACK_TRACE ON) + else() + set(DEFAULT_STACK_TRACE OFF) + set(LIBUNWIND_LIBRARIES "") + endif() endif() option(STACK_TRACE "Install a hook that dumps stack on exception" ${DEFAULT_STACK_TRACE}) |