- Stacktrace generation with failed asserts

This commit is contained in:
2025-07-05 14:22:59 -04:00
parent 0afaae72ac
commit a33bf5206f
22 changed files with 529 additions and 191 deletions

View File

@@ -7,6 +7,9 @@ project(fennec)
set(SDL_STATIC 1)
add_subdirectory(external/sdl)
# CppTrace is a dependency of the project, added as a git submodule
add_subdirectory(external/cpptrace)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_C_STANDARD 26)
@@ -15,6 +18,8 @@ find_package(Doxygen)
# any necessary include directories
include_directories(include)
include_directories(external/cpptrace/include)
include_directories(external/sdl/include)
# Metaprogramming is a dependency for generating various type info before compilation of the engine.
add_subdirectory(metaprogramming)
@@ -58,7 +63,9 @@ add_library(fennec STATIC
include/fennec/lang/integer.h
include/fennec/lang/detail/__bits.h
include/fennec/lang/detail/__int.h
include/fennec/lang/detail/__numeric_transforms.h
include/fennec/lang/detail/__stdlib.h
include/fennec/lang/detail/__type_traits.h
include/fennec/lang/detail/__type_sequences.h
@@ -75,6 +82,9 @@ add_library(fennec STATIC
include/fennec/memory/detail/__ptr_traits.h
# DEBUG ================================================================================================================
source/debug/assert_impl.cpp
# MATH =================================================================================================================
include/fennec/math/math.h
@@ -98,22 +108,26 @@ add_library(fennec STATIC
include/fennec/math/relational.h
include/fennec/math/detail/__fwd.h
include/fennec/math/detail/__math.h
include/fennec/math/detail/__matrix.h
include/fennec/math/detail/__types.h
include/fennec/math/detail/__vector_traits.h
source/debug/assert_impl.cpp
include/fennec/math/detail/__math.h
include/fennec/lang/detail/__int.h
include/fennec/lang/detail/__stdlib.h
include/fennec/math/detail/__matrix.h
include/fennec/math/ext/constants.h
# FPROC ================================================================================================================
# Strings
include/fennec/fproc/strings/string.h
include/fennec/fproc/strings/detail/__ctype.h
)
# add metaprogramming templates as a dependency and also force documentation to be generated when fennec is compiled
if(DOXYGEN_FOUND)
add_dependencies(fennec fennecdocs metaprogramming SDL3-static)
add_dependencies(fennec fennecdocs metaprogramming SDL3-static cpptrace::cpptrace)
else()
add_dependencies(fennec metaprogramming SDL3-static)
add_dependencies(fennec metaprogramming SDL3-static cpptrace::cpptrace)
endif()
# Compiler Warning Flags
@@ -123,12 +137,14 @@ else()
add_compile_options("-Wall" "-Wextra" "-pedantic" "-Werror") # All gcc/etc. Warnings throw as errors
endif()
#target_compile_options(fennec PUBLIC "-mavx" "-mavx2" "-mavx512f") # SIMD Instructions, currently unused
target_compile_options(fennec PUBLIC "-mavx" "-mavx2" "-mavx512f") # SIMD Instructions, automatic vectorization will occur
target_link_options(fennec PRIVATE "-nostdlib") # Do not compile base fennec library with c++ stdlib
target_link_options(fennec PRIVATE "-nostdlib -nodefaultlibs -fno-exceptions") # Do not compile base fennec library with c++ stdlib
# fennec does not use the C++ stdlib because it is bloated, difficult to read, and implementation defined.
# This implementation is designed to be as readable as possible, and expose information that would otherwise be obfuscated
target_link_libraries(fennec PRIVATE SDL3-static cpptrace::cpptrace)
# add the test suite as a sub-project
add_subdirectory(test)