scons for exec
authorvictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Tue, 10 Nov 2009 13:16:01 +0000 (13:16 +0000)
committervictor <victor@e16421f0-f15b-0410-abcd-98678b794739>
Tue, 10 Nov 2009 13:16:01 +0000 (13:16 +0000)
git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@528 e16421f0-f15b-0410-abcd-98678b794739

SConstruct
exec/SConscript [new file with mode: 0644]
tests/transfertest.cpp

index b0f8cb9..a2155b1 100644 (file)
@@ -100,3 +100,4 @@ Export("libs")
 Export("libpath")
 Export("DEBUG")
 SConscript('tests/SConscript')
+SConscript('exec/SConscript')
diff --git a/exec/SConscript b/exec/SConscript
new file mode 100644 (file)
index 0000000..acf407f
--- /dev/null
@@ -0,0 +1,43 @@
+import sys
+
+Import("DEBUG")
+Import("env")
+Import("libpath")
+
+cpppath = env["CPPPATH"]
+libs = ['p2tp']
+
+if sys.platform == "win32":
+    cpppath = ".."
+    libpath += '..;'
+    if DEBUG:
+        env.Append(CXXFLAGS="/Zi /Yd /MTd")
+else:
+    cpppath = cpppath + ':..'
+    libpath += ':..'
+    if DEBUG:
+        env.Append(CXXFLAGS="-g")
+
+print "tests: libpath is",libpath
+
+env.Program( 
+    target='seeder',
+    source=['seeder.cpp'],
+    CPPPATH=cpppath,
+    LIBS=libs,
+    LIBPATH=libpath )
+
+env.Program( 
+    target='leecher',
+    source=['leecher.cpp'],
+    CPPPATH=cpppath,
+    LIBS=libs,
+    LIBPATH=libpath )
+
+env.Program( 
+    target='hasher',
+    source=['hasher.cpp'],
+    CPPPATH=cpppath,
+    LIBS=libs,
+    LIBPATH=libpath )
+
index 521445e..4aea0f4 100644 (file)
@@ -10,6 +10,7 @@
 //#include <glog/logging.h>
 #include "p2tp.h"
 #include "compat.h"
+#include <gtest/gtest.h>
 
 using namespace p2tp;