From 097ad002c98e2f4f68cf26fa599ef3fffea8f625 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 27 Apr 2023 18:12:32 +0200 Subject: [PATCH] Fix build when tests are turned off. --- config.py | 1 - register_types.cpp | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index ec74dcd..a45a9c1 100644 --- a/config.py +++ b/config.py @@ -6,7 +6,6 @@ def configure(env): env.pmlpp_build_old_classes = True env.pmlpp_build_tests = True - def get_doc_classes(): return [ "MLPPVector", diff --git a/register_types.cpp b/register_types.cpp index 1c5712c..406b0f0 100644 --- a/register_types.cpp +++ b/register_types.cpp @@ -69,8 +69,10 @@ SOFTWARE. #include "mlpp/uni_lin_reg/uni_lin_reg.h" #include "mlpp/wgan/wgan.h" -#include "test/mlpp_tests.h" +#ifdef TESTS_ENABLED #include "test/mlpp_matrix_tests.h" +#include "test/mlpp_tests.h" +#endif void register_pmlpp_types(ModuleRegistrationLevel p_level) { if (p_level == MODULE_REGISTRATION_LEVEL_SCENE) { @@ -125,8 +127,10 @@ void register_pmlpp_types(ModuleRegistrationLevel p_level) { ClassDB::register_class(); ClassDB::register_class(); +#ifdef TESTS_ENABLED ClassDB::register_class(); ClassDB::register_class(); +#endif } }