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,