mirror of
https://github.com/Relintai/pmlpp.git
synced 2024-12-21 14:56:47 +01:00
Now the standalone build works properly.
This commit is contained in:
parent
ff114c379f
commit
1cd8c0e134
@ -103,6 +103,8 @@ def add_mlpp(env):
|
||||
else:
|
||||
# Static compilation
|
||||
module_env.add_source_files(env.modules_sources, sources)
|
||||
lib = env.add_library("mlpp", env.modules_sources)
|
||||
env.Prepend(LIBS=[lib])
|
||||
|
||||
for x in sorted(glob.glob("platform/*")):
|
||||
if not os.path.isdir(x) or not os.path.exists(x + "/detect.py"):
|
||||
@ -660,12 +662,15 @@ if selected_platform in platform_list:
|
||||
Export("env")
|
||||
|
||||
# build subdirs, the build order is dependent on link order.
|
||||
add_mlpp(env)
|
||||
|
||||
SConscript("platform/SCsub")
|
||||
|
||||
SConscript("platform/" + selected_platform + "/SCsub") # build selected platform
|
||||
|
||||
add_mlpp(env)
|
||||
|
||||
SConscript("platform/main/SCsub")
|
||||
|
||||
# Microsoft Visual Studio Project Generation
|
||||
if env["vsproj"]:
|
||||
if os.name != "nt":
|
||||
|
@ -12,9 +12,3 @@ env.add_source_files(env.platform_sources, "image.cpp")
|
||||
lib = env.add_library("platform", env.platform_sources)
|
||||
env.Prepend(LIBS=[lib])
|
||||
|
||||
# TODO Move this to somewhere else, so it can be easily overridden
|
||||
env.main_sources = []
|
||||
|
||||
env.add_source_files(env.main_sources, "main.cpp")
|
||||
lib = env.add_library("main", env.main_sources)
|
||||
env.Prepend(LIBS=[lib])
|
||||
|
11
platform/main/SCsub
Normal file
11
platform/main/SCsub
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from compat import open_utf8
|
||||
|
||||
Import("env")
|
||||
|
||||
env.main_sources = []
|
||||
|
||||
env.add_source_files(env.main_sources, "main.cpp")
|
||||
lib = env.add_library("main", env.main_sources)
|
||||
env.Prepend(LIBS=[lib])
|
@ -1,16 +1,16 @@
|
||||
|
||||
#include "sfw.h"
|
||||
|
||||
//#include "test/mlpp_tests.h"
|
||||
//#include "test/mlpp_matrix_tests.h"
|
||||
#include "test/mlpp_tests.h"
|
||||
#include "test/mlpp_matrix_tests.h"
|
||||
|
||||
int main() {
|
||||
SFWCore::setup();
|
||||
|
||||
//Ref<MLPPTests> tests;
|
||||
//tests.instance();
|
||||
Ref<MLPPTests> tests;
|
||||
tests.instance();
|
||||
|
||||
//tests->test_statistics();
|
||||
tests->test_statistics();
|
||||
|
||||
//tests->test_multivariate_linear_regression_gradient_descent(true);
|
||||
|
Loading…
Reference in New Issue
Block a user