From 1aa62cb39663e0bad936c3f1b9bf58c5e979c7b6 Mon Sep 17 00:00:00 2001 From: Orange Date: Tue, 15 Jul 2025 11:51:14 +0300 Subject: [PATCH] Enables legacy code compilation The changes encapsulate the matrix tests within an `#ifdef` block, allowing conditional compilation based on whether `OMATH_ENABLE_LEGACY` is defined. This enables the legacy code to be compiled only when needed. --- tests/general/unit_test_matrix.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/general/unit_test_matrix.cpp b/tests/general/unit_test_matrix.cpp index ec56cbc..b7543c6 100644 --- a/tests/general/unit_test_matrix.cpp +++ b/tests/general/unit_test_matrix.cpp @@ -1,6 +1,9 @@ // // Created by vlad on 5/18/2024. // + +#ifdef OMATH_ENABLE_LEGACY + #include #include #include "omath/vector3.hpp" @@ -177,4 +180,5 @@ TEST_F(UnitTestMatrix, AssignmentOperator_Move) EXPECT_FLOAT_EQ(m3.at(0, 0), 1.0f); EXPECT_EQ(m2.row_count(), 0); // m2 should be empty after the move EXPECT_EQ(m2.columns_count(), 0); -} \ No newline at end of file +} +#endif