From 9337d8bc3cde964ba804274fd6d09173c416614f Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Mon, 28 Oct 2024 22:21:23 +0100 Subject: Some more work on cross-platform configuration --- asl/assert.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'asl/assert.hpp') diff --git a/asl/assert.hpp b/asl/assert.hpp index d419c24..2322a5b 100644 --- a/asl/assert.hpp +++ b/asl/assert.hpp @@ -1,6 +1,13 @@ #pragma once -// @Todo Make this portable-ish +#include "asl/config.hpp" + +#if ASL_COMPILER_CLANG_CL + #define ASL_DEBUG_BREAK() __debugbreak() +#elif ASL_COMPILER_CLANG + #define ASL_DEBUG_BREAK() __builtin_debug_trap() +#endif + #define ASL_ASSERT(...) \ if (__VA_ARGS__) {} \ - else { __builtin_debugtrap(); } + else { ASL_DEBUG_BREAK(); } -- cgit