summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--default.bld29
-rw-r--r--src/network.h8
-rw-r--r--src/tests/pic.cpp7
-rw-r--r--tests/.gitignore2
4 files changed, 43 insertions, 3 deletions
diff --git a/default.bld b/default.bld
index be99b23..f2fb0cc 100644
--- a/default.bld
+++ b/default.bld
@@ -3,7 +3,32 @@ target "libneural.a"
3 rule "lib"; 3 rule "lib";
4 input files("src/*.cpp"); 4 input files("src/*.cpp");
5 5
6 CXXFLAGS += "-I."; 6 CXXFLAGS += "-I. -ggdb";
7 LDCONFIG += "-lbu++"; 7}
8
9for src in files("src/tests/*.cpp") do
10{
11 target src.replace("src/","").replace(".cpp","")
12 {
13 rule "exe";
14 input src;
15 requires "libneural.a";
16
17 CXXFLAGS += "-I. -ggdb";
18 LDFLAGS += "-L. -lneural -lbu++ -ggdb";
19 }
20}
21
22for dir in dirs("src/tests/*") do
23{
24 target dir.replace("src/","")
25 {
26 rule "exe";
27 input files( dir + "/*.cpp");
28 requires "libneural.a";
29
30 CXXFLAGS += "-I. -ggdb";
31 LDFLAGS += "-L. -lneural -lbu++ -lpthread -ggdb";
32 }
8} 33}
9 34
diff --git a/src/network.h b/src/network.h
index 85d8407..e364459 100644
--- a/src/network.h
+++ b/src/network.h
@@ -3,6 +3,8 @@
3 3
4#include "neural/node.h" 4#include "neural/node.h"
5 5
6#include <bu/string.h>
7
6namespace Neural 8namespace Neural
7{ 9{
8 template<typename sigtype> 10 template<typename sigtype>
@@ -19,7 +21,11 @@ namespace Neural
19 delete pRoot; 21 delete pRoot;
20 } 22 }
21 23
22 24 static Network<sigtype> *fromStr( const Bu::String &sCode )
25 {
26 Network<sigtype> *pNet = new Network<sigtype>();
27 return pNet;
28 }
23 29
24 private: 30 private:
25 Node<sigtype> *pRoot; 31 Node<sigtype> *pRoot;
diff --git a/src/tests/pic.cpp b/src/tests/pic.cpp
new file mode 100644
index 0000000..89bfcaf
--- /dev/null
+++ b/src/tests/pic.cpp
@@ -0,0 +1,7 @@
1#include "neural/network.h"
2
3int main( int argc, char *argv[] )
4{
5 return 0;
6}
7
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..120f485
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,2 @@
1*
2!/.gitignore