diff options
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3b71c38cd..4cbdf1510 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -53,14 +53,10 @@ function (monero_install_headers subdir) endfunction () function (enable_stack_trace target) - if(STACK_TRACE) - set_property(TARGET ${target} - APPEND PROPERTY COMPILE_DEFINITIONS "STACK_TRACE") - if (STATIC) - set_property(TARGET "${target}" - APPEND PROPERTY LINK_FLAGS "-Wl,--wrap=__cxa_throw") - endif() - endif() + if (STATIC AND STACK_TRACE_ON_EXCEPTIONS) + set_property(TARGET "${target}" + APPEND PROPERTY LINK_FLAGS "-Wl,--wrap=__cxa_throw") + endif() endfunction() function (monero_add_executable name) |
