From b6fa7a355bfeda8e9ac5abd7d54b3e26e4b792ee Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 27 Apr 2023 18:09:53 +0200 Subject: [PATCH] Also set up build defines. --- SCsub | 10 ++++++---- config.py | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/SCsub b/SCsub index ee377e6..018ee9c 100644 --- a/SCsub +++ b/SCsub @@ -52,14 +52,17 @@ sources = [ "mlpp/wgan/wgan.cpp", ] -if env.pmlpp_build_tests: +if module_env.pmlpp_build_tests: + module_env.Prepend(CPPDEFINES=["TESTS_ENABLED"]) + sources += [ "test/mlpp_tests.cpp", "test/mlpp_matrix_tests.cpp", ] -if env.pmlpp_build_old_classes: - print("asdasdasd") +if module_env.pmlpp_build_old_classes: + module_env.Prepend(CPPDEFINES=["OLD_CLASSES_ENABLED"]) + sources += [ "mlpp/wgan/wgan_old.cpp", "mlpp/output_layer/output_layer_old.cpp", @@ -101,6 +104,5 @@ if env.pmlpp_build_old_classes: ] - module_env.add_source_files(env.modules_sources, sources) diff --git a/config.py b/config.py index fceefb1..ec74dcd 100644 --- a/config.py +++ b/config.py @@ -1,3 +1,4 @@ + def can_build(env, platform): return True @@ -5,6 +6,7 @@ def configure(env): env.pmlpp_build_old_classes = True env.pmlpp_build_tests = True + def get_doc_classes(): return [ "MLPPVector",