Also set up build defines.

This commit is contained in:
Relintai 2023-04-27 18:09:53 +02:00
parent ac2c9a78a7
commit b6fa7a355b
2 changed files with 8 additions and 4 deletions

10
SCsub
View File

@ -52,14 +52,17 @@ sources = [
"mlpp/wgan/wgan.cpp", "mlpp/wgan/wgan.cpp",
] ]
if env.pmlpp_build_tests: if module_env.pmlpp_build_tests:
module_env.Prepend(CPPDEFINES=["TESTS_ENABLED"])
sources += [ sources += [
"test/mlpp_tests.cpp", "test/mlpp_tests.cpp",
"test/mlpp_matrix_tests.cpp", "test/mlpp_matrix_tests.cpp",
] ]
if env.pmlpp_build_old_classes: if module_env.pmlpp_build_old_classes:
print("asdasdasd") module_env.Prepend(CPPDEFINES=["OLD_CLASSES_ENABLED"])
sources += [ sources += [
"mlpp/wgan/wgan_old.cpp", "mlpp/wgan/wgan_old.cpp",
"mlpp/output_layer/output_layer_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) module_env.add_source_files(env.modules_sources, sources)

View File

@ -1,3 +1,4 @@
def can_build(env, platform): def can_build(env, platform):
return True return True
@ -5,6 +6,7 @@ def configure(env):
env.pmlpp_build_old_classes = True env.pmlpp_build_old_classes = True
env.pmlpp_build_tests = True env.pmlpp_build_tests = True
def get_doc_classes(): def get_doc_classes():
return [ return [
"MLPPVector", "MLPPVector",