From 998f176a4053e0a58a13860ba17a35863d43fc51 Mon Sep 17 00:00:00 2001 From: Jean-Bapiste Lepesme Date: Wed, 28 Sep 2016 00:57:46 +0200 Subject: [PATCH] Don't append definitions if already cached --- BackwardMacros.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BackwardMacros.cmake b/BackwardMacros.cmake index 8bf054e..1d138cf 100644 --- a/BackwardMacros.cmake +++ b/BackwardMacros.cmake @@ -104,8 +104,10 @@ macro(map_definitions var_prefix define_prefix) endforeach() endmacro() -map_definitions("STACK_WALKING_" "BACKWARD_HAS_" UNWIND BACKTRACE) -map_definitions("STACK_DETAILS_" "BACKWARD_HAS_" BACKTRACE_SYMBOL DW BFD) +if (NOT BACKWARD_DEFINITIONS) + map_definitions("STACK_WALKING_" "BACKWARD_HAS_" UNWIND BACKTRACE) + map_definitions("STACK_DETAILS_" "BACKWARD_HAS_" BACKTRACE_SYMBOL DW BFD) +endif() foreach(def ${BACKWARD_DEFINITIONS}) message(STATUS "${def}")