Update to latest Arbutils
continuous-integration/drone/push Build is failing Details

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2020-08-16 17:41:56 +02:00
parent 56b92a22a6
commit a828e2d09c
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
3 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#include "Core.hpp"
std::string ExceptionHandler::_creatureLibLastException = "";
std::string ExceptionHandler::_creatureLibLastExceptionStacktrace = "";
std::string ExceptionHandler::_creatureLibLastExceptionStacktrace = "Unset";
export const char* CreatureLib_C_GetLastException() { return ExceptionHandler::GetLastException(); }
export const char* CreatureLib_C_GetLastExceptionStacktrace() { return ExceptionHandler::GetLastExceptionStacktrace(); }

View File

@ -21,11 +21,14 @@ public:
ss << "[" << function << "] " << e.what();
_creatureLibLastException = ss.str();
_creatureLibLastExceptionStacktrace = e.GetStacktrace(depth, true);
if (_creatureLibLastExceptionStacktrace.empty())
_creatureLibLastExceptionStacktrace = "err";
}
static void SetLastException(const std::string& function, const std::exception& e) {
std::stringstream ss;
ss << "[" << function << "] " << e.what();
_creatureLibLastException = ss.str();
_creatureLibLastExceptionStacktrace = "Exception did not have a stacktrace.";
}
static const char* GetLastException() { return _creatureLibLastException.c_str(); }
static const char* GetLastExceptionStacktrace() { return _creatureLibLastExceptionStacktrace.c_str(); }

View File

@ -15,6 +15,11 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-fconcepts)
endif ()
if (NOT WINDOWS)
# Include debug symbols in all linux builds
add_compile_options(-g -gfull -g3)
endif ()
include(CmakeConanSetup.cmake)
SetupConan()
@ -44,7 +49,7 @@ endif (WINDOWS)
# Set up links to all relevant libraries.
SET(_LIBRARYLINKS Arbutils)
if (NOT WINDOWS)
set(_LIBRARYLINKS ${_LIBRARYLINKS} -lbfd -ldl)
set(_LIBRARYLINKS ${_LIBRARYLINKS} -ldw)
endif ()
# If we need to link the C libraries statically, do so.