From 1347abad3456e894751591e63f20176a478a8508 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Tue, 24 Feb 2026 17:04:58 +0100 Subject: [PATCH] add backward-cpp library dependency + tracy abbr --- CMakeLists.txt | 6 ++++-- flake.nix | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b239add..be16d57 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ set(CMAKE_CXX_STANDARD 26) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) find_package(raylib REQUIRED) +find_package(Backward REQUIRED) # Need to enable/disable this based on a variable for nix build if(USE_TRACY) @@ -43,14 +44,15 @@ add_executable(masssprings src/state.cpp src/input.cpp src/tracy.cpp + src/backward.cpp ) target_include_directories(masssprings PUBLIC ${RAYLIB_CPP_INCLUDE_DIR}) if(USE_TRACY) - target_link_libraries(masssprings PUBLIC raylib TracyClient) + target_link_libraries(masssprings PUBLIC raylib Backward::Backward TracyClient) else() - target_link_libraries(masssprings PUBLIC raylib) + target_link_libraries(masssprings PUBLIC raylib Backward::Backward) endif() include(CheckIPOSupported) diff --git a/flake.nix b/flake.nix index 694ed91..e0c15be 100644 --- a/flake.nix +++ b/flake.nix @@ -128,7 +128,7 @@ rec { # - Interpreters needed by patchShebangs for build scripts (with the --build flag), which can be the case for e.g. perl nativeBuildInputs = with pkgs; [ # Languages: - # bintools + binutils gcc # C/C++: @@ -159,6 +159,8 @@ rec { # octree # this one doesn't store center of mass per node - which I need :( tracy-wayland thread-pool + backward-cpp + libbfd # llvmPackages.openmp # not required for compilation but for clangd to find the headers # raylib-cpp # tinyobjloader @@ -283,7 +285,7 @@ rec { abbr -a debug "${buildDebug} && ./cmake-build-debug/masssprings" abbr -a release "${buildRelease} && ./cmake-build-release/masssprings" abbr -a rungdb "${buildDebug} && gdb --tui ./cmake-build-debug/masssprings" - abbr -a runtracy "tracy -a 127.0.0.1" + abbr -a runtracy "tracy -a 127.0.0.1 &; ${buildRelease} && sudo -E ./cmake-build-release/masssprings" ''; in builtins.concatStringsSep "\n" [