added cpptrace

This commit is contained in:
Scott E. Graves 2024-07-26 07:54:29 -05:00
parent f1ec1fd4a6
commit f3dfadddfa
5 changed files with 27 additions and 0 deletions

View File

@ -16,6 +16,7 @@ cppcoreguidelines
cppdbg
cppflags
cpphttplib
cpptrace
cppvsdbg
cstdint
cxxflags

View File

@ -14,6 +14,7 @@ RUN apk add \
bzip2-static \
cmake \
diffutils \
elfutils-dev \
fontconfig-dev \
fontconfig-static \
freetype \

View File

@ -14,6 +14,7 @@ RUN apk add \
bzip2-static \
cmake \
diffutils \
elfutils-dev \
fontconfig-dev \
fontconfig-static \
freetype \

View File

@ -1,3 +1,22 @@
include(FetchContent)
FetchContent_Declare(
cpptrace
GIT_REPOSITORY https://github.com/jeremy-rifkin/cpptrace.git
GIT_TAG v0.6.3
)
FetchContent_MakeAvailable(cpptrace)
link_libraries(cpptrace::cpptrace)
if(WIN32)
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:cpptrace::cpptrace>
$<TARGET_FILE_DIR:your_target>
)
endif()
set(CMAKE_CXX_FLAGS "-include common.hpp ${CMAKE_CXX_FLAGS}")
add_project_library(lib${PROJECT_NAME} "" "" "${PROJECT_ADDITIONAL_SOURCES}")

View File

@ -19,6 +19,8 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include "cpptrace/cpptrace.hpp"
#include "cli/actions.hpp"
#include "initialize.hpp"
#include "types/repertory.hpp"
@ -28,6 +30,9 @@
using namespace repertory;
auto main(int argc, char **argv) -> int {
cpptrace::register_terminate_handler();
cpptrace::generate_trace().print();
if (not repertory::project_initialize()) {
return -1;
}