From e5b4fed4ee9ef5d3045b0bf14ef177b802a503a0 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 18 Jan 2025 13:19:35 -0500 Subject: [PATCH] Bring in a first start to a Tracy enabled build but I have to learn more about how to run it. --- Makefile | 6 +++++- meson.build | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6542778..f0bcaa8 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,11 @@ release_build: meson compile -j 10 -C builddir debug_build: - meson --wipe builddir --buildtype debug + meson setup --wipe builddir --buildtype debug + meson compile -j 10 -C builddir + +tracy_build: + meson setup --wipe builddir --buildtype debugoptimized -Dtracy_enable=true meson compile -j 10 -C builddir test: build diff --git a/meson.build b/meson.build index bdd6a14..566403e 100644 --- a/meson.build +++ b/meson.build @@ -3,6 +3,7 @@ project('raycaster', 'cpp', cc = meson.get_compiler('cpp') +tracy = dependency('tracy', static: true) catch2 = dependency('catch2-with-main') fmt = dependency('fmt') freetype = dependency('freetype2') @@ -17,6 +18,10 @@ sfml_network = dependency('sfml_network') sfml_system = dependency('sfml_system') sfml_window = dependency('sfml_window') +if get_option('tracy_enable') and get_option('buildtype') != 'debugoptimized' + warning('Profiling builds should set --buildtype=debugoptimized') +endif + dependencies = [ fmt, json, opengl32, freetype, winmm, gdi32, sfml_audio, sfml_graphics,