aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-08-11 14:49:39 +0200
committerRiccardo Spagni <ric@spagni.net>2016-08-11 14:49:39 +0200
commitf0033155637df7413ec72ce7c0d5da4ab59ac1cd (patch)
treedbeecec50633ac79c93de52b01afafd4662fb886 /src
parentMerge pull request #937 (diff)
parentcmake: do not pass -O2 in debug build on ARM (diff)
downloadmonero-f0033155637df7413ec72ce7c0d5da4ab59ac1cd.tar.xz
Merge pull request #939
33b5ebd cmake: do not pass -O2 in debug build on ARM (redfish) 35dc40a cmake: libatomic only needed for 32-bit Clang builds (redfish) 042db0b cmake: cleanup logic that sets flags per target/subdir (redfish)
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e2349744d..8fa617aff 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -47,6 +47,17 @@ function (bitmonero_install_headers subdir)
COMPONENT development)
endfunction ()
+function (enable_stack_trace target)
+ if(STACK_TRACE)
+ set_property(TARGET ${target}
+ APPEND PROPERTY COMPILER_DEFINITIONS "-DSTACK_TRACE")
+ if (STATIC)
+ set_property(TARGET "${target}"
+ APPEND PROPERTY LINK_FLAGS "-Wl,--wrap=__cxa_throw")
+ endif()
+ endif()
+endfunction()
+
function (bitmonero_add_executable name)
source_group("${name}"
FILES
@@ -63,6 +74,7 @@ function (bitmonero_add_executable name)
set_property(TARGET "${name}"
PROPERTY
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+ enable_stack_trace("${name}")
endfunction ()
function (bitmonero_add_library name)