Commit 5d51b50f authored by sagnowski's avatar sagnowski
Browse files

Include function names in call stack printout on Linux

parent 31e53e22
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -6,6 +6,12 @@ set(CMAKE_C_STANDARD 99)
include(CTest)
enable_testing()

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
  # Needed for printing stack trace on Linux
  add_compile_options(-rdynamic)
  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -export-dynamic")
endif()

set(dirs lib_enc lib_dec lib_com basic_op basic_math lib_debug)
include_directories(${dirs})

+6 −0
Original line number Diff line number Diff line
@@ -30,6 +30,12 @@ ifeq "$(RELEASE)" "1"
CFLAGS   += -DRELEASE
DELIVERY  = 1
OPTIM    ?= 2
else
ifeq ($(shell uname -s), Linux)
# Needed for printing stack trace on Linux
CFLAGS   += -rdynamic
LDFLAGS  += -export-dynamic
endif
endif

ifneq "$(DEBUG)" "0"