From ac2c9a78a79ac8c0d94410eff7e5148cf24522ad Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 27 Apr 2023 17:55:56 +0200 Subject: [PATCH] Added variables to be able to control some parts of the build. --- SCsub | 90 ++++++++++++++++++++++++++++++------------------------- config.py | 3 +- 2 files changed, 51 insertions(+), 42 deletions(-) diff --git a/SCsub b/SCsub index 0781ea2..ee377e6 100644 --- a/SCsub +++ b/SCsub @@ -50,49 +50,57 @@ sources = [ "mlpp/uni_lin_reg/uni_lin_reg.cpp", "mlpp/utilities/utilities.cpp", "mlpp/wgan/wgan.cpp", - - "mlpp/wgan/wgan_old.cpp", - "mlpp/output_layer/output_layer_old.cpp", - "mlpp/multi_output_layer/multi_output_layer_old.cpp", - "mlpp/hidden_layer/hidden_layer_old.cpp", - "mlpp/mlp/mlp_old.cpp", - "mlpp/pca/pca_old.cpp", - "mlpp/uni_lin_reg/uni_lin_reg_old.cpp", - "mlpp/outlier_finder/outlier_finder_old.cpp", - "mlpp/probit_reg/probit_reg_old.cpp", - "mlpp/svc/svc_old.cpp", - "mlpp/softmax_reg/softmax_reg_old.cpp", - "mlpp/auto_encoder/auto_encoder_old.cpp", - "mlpp/tanh_reg/tanh_reg_old.cpp", - "mlpp/softmax_net/softmax_net_old.cpp", - "mlpp/multinomial_nb/multinomial_nb_old.cpp", - "mlpp/mann/mann_old.cpp", - "mlpp/log_reg/log_reg_old.cpp", - "mlpp/lin_reg/lin_reg_old.cpp", - "mlpp/gaussian_nb/gaussian_nb_old.cpp", - "mlpp/gan/gan_old.cpp", - "mlpp/exp_reg/exp_reg_old.cpp", - "mlpp/dual_svc/dual_svc_old.cpp", - "mlpp/c_log_log_reg/c_log_log_reg_old.cpp", - "mlpp/bernoulli_nb/bernoulli_nb_old.cpp", - "mlpp/ann/ann_old.cpp", - "mlpp/numerical_analysis/numerical_analysis_old.cpp", - "mlpp/regularization/reg_old.cpp", - "mlpp/gauss_markov_checker/gauss_markov_checker_old.cpp", - "mlpp/utilities/utilities_old.cpp", - "mlpp/transforms/transforms_old.cpp", - "mlpp/stat/stat_old.cpp", - "mlpp/lin_alg/lin_alg_old.cpp", - "mlpp/hypothesis_testing/hypothesis_testing_old.cpp", - "mlpp/data/data_old.cpp", - "mlpp/cost/cost_old.cpp", - "mlpp/convolutions/convolutions_old.cpp", - "mlpp/activation/activation_old.cpp", - - "test/mlpp_tests.cpp", - "test/mlpp_matrix_tests.cpp", ] +if env.pmlpp_build_tests: + sources += [ + "test/mlpp_tests.cpp", + "test/mlpp_matrix_tests.cpp", + ] + +if env.pmlpp_build_old_classes: + print("asdasdasd") + sources += [ + "mlpp/wgan/wgan_old.cpp", + "mlpp/output_layer/output_layer_old.cpp", + "mlpp/multi_output_layer/multi_output_layer_old.cpp", + "mlpp/hidden_layer/hidden_layer_old.cpp", + "mlpp/mlp/mlp_old.cpp", + "mlpp/pca/pca_old.cpp", + "mlpp/uni_lin_reg/uni_lin_reg_old.cpp", + "mlpp/outlier_finder/outlier_finder_old.cpp", + "mlpp/probit_reg/probit_reg_old.cpp", + "mlpp/svc/svc_old.cpp", + "mlpp/softmax_reg/softmax_reg_old.cpp", + "mlpp/auto_encoder/auto_encoder_old.cpp", + "mlpp/tanh_reg/tanh_reg_old.cpp", + "mlpp/softmax_net/softmax_net_old.cpp", + "mlpp/multinomial_nb/multinomial_nb_old.cpp", + "mlpp/mann/mann_old.cpp", + "mlpp/log_reg/log_reg_old.cpp", + "mlpp/lin_reg/lin_reg_old.cpp", + "mlpp/gaussian_nb/gaussian_nb_old.cpp", + "mlpp/gan/gan_old.cpp", + "mlpp/exp_reg/exp_reg_old.cpp", + "mlpp/dual_svc/dual_svc_old.cpp", + "mlpp/c_log_log_reg/c_log_log_reg_old.cpp", + "mlpp/bernoulli_nb/bernoulli_nb_old.cpp", + "mlpp/ann/ann_old.cpp", + "mlpp/numerical_analysis/numerical_analysis_old.cpp", + "mlpp/regularization/reg_old.cpp", + "mlpp/gauss_markov_checker/gauss_markov_checker_old.cpp", + "mlpp/utilities/utilities_old.cpp", + "mlpp/transforms/transforms_old.cpp", + "mlpp/stat/stat_old.cpp", + "mlpp/lin_alg/lin_alg_old.cpp", + "mlpp/hypothesis_testing/hypothesis_testing_old.cpp", + "mlpp/data/data_old.cpp", + "mlpp/cost/cost_old.cpp", + "mlpp/convolutions/convolutions_old.cpp", + "mlpp/activation/activation_old.cpp", + ] + + module_env.add_source_files(env.modules_sources, sources) diff --git a/config.py b/config.py index 23e9930..fceefb1 100644 --- a/config.py +++ b/config.py @@ -2,7 +2,8 @@ def can_build(env, platform): return True def configure(env): - pass + env.pmlpp_build_old_classes = True + env.pmlpp_build_tests = True def get_doc_classes(): return [