pmlpp/SCsub

80 lines
2.3 KiB
Plaintext
Raw Normal View History

2023-01-23 21:58:34 +01:00
import os
Import('env')
module_env = env.Clone()
module_env.pmlpp_build_tests = True
if ARGUMENTS.get('pmlpp_build_tests', 'yes') == 'no':
module_env.pmlpp_build_tests = False
2023-01-23 21:58:34 +01:00
sources = [
"register_types.cpp",
"mlpp/lin_alg/mlpp_vector.cpp",
"mlpp/lin_alg/mlpp_matrix.cpp",
"mlpp/lin_alg/mlpp_tensor3.cpp",
"mlpp/activation/activation.cpp",
"mlpp/ann/ann.cpp",
"mlpp/auto_encoder/auto_encoder.cpp",
"mlpp/bernoulli_nb/bernoulli_nb.cpp",
"mlpp/c_log_log_reg/c_log_log_reg.cpp",
"mlpp/convolutions/convolutions.cpp",
"mlpp/cost/cost.cpp",
"mlpp/data/data.cpp",
"mlpp/dual_svc/dual_svc.cpp",
"mlpp/exp_reg/exp_reg.cpp",
"mlpp/gan/gan.cpp",
"mlpp/gaussian_nb/gaussian_nb.cpp",
"mlpp/gauss_markov_checker/gauss_markov_checker.cpp",
"mlpp/hidden_layer/hidden_layer.cpp",
"mlpp/hypothesis_testing/hypothesis_testing.cpp",
"mlpp/kmeans/kmeans.cpp",
"mlpp/knn/knn.cpp",
"mlpp/lin_alg/lin_alg.cpp",
"mlpp/lin_reg/lin_reg.cpp",
"mlpp/log_reg/log_reg.cpp",
"mlpp/mann/mann.cpp",
"mlpp/mlp/mlp.cpp",
"mlpp/multinomial_nb/multinomial_nb.cpp",
"mlpp/multi_output_layer/multi_output_layer.cpp",
"mlpp/numerical_analysis/numerical_analysis.cpp",
"mlpp/outlier_finder/outlier_finder.cpp",
"mlpp/output_layer/output_layer.cpp",
"mlpp/pca/pca.cpp",
"mlpp/probit_reg/probit_reg.cpp",
"mlpp/regularization/reg.cpp",
"mlpp/softmax_net/softmax_net.cpp",
"mlpp/softmax_reg/softmax_reg.cpp",
"mlpp/stat/stat.cpp",
"mlpp/svc/svc.cpp",
"mlpp/tanh_reg/tanh_reg.cpp",
"mlpp/transforms/transforms.cpp",
"mlpp/uni_lin_reg/uni_lin_reg.cpp",
"mlpp/utilities/utilities.cpp",
"mlpp/wgan/wgan.cpp",
]
2023-01-25 01:25:49 +01:00
2023-04-27 18:09:53 +02:00
if module_env.pmlpp_build_tests:
module_env.Prepend(CPPDEFINES=["TESTS_ENABLED"])
sources += [
"test/mlpp_tests.cpp",
"test/mlpp_matrix_tests.cpp",
]
2023-01-23 21:58:34 +01:00
if ARGUMENTS.get('pmlpp_shared', 'no') == 'yes':
# Shared lib compilation
module_env.Append(CCFLAGS=['-fPIC'])
module_env['LIBS'] = []
shared_lib = module_env.SharedLibrary(target='#bin/pmlpp', source=sources)
shared_lib_shim = shared_lib[0].name.rsplit('.', 1)[0]
env.Append(LIBS=[shared_lib_shim])
env.Append(LIBPATH=['#bin'])
else:
# Static compilation
module_env.add_source_files(env.modules_sources, sources)