summaryrefslogtreecommitdiffstats
path: root/test/Java/swig-dependencies.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2018-11-13 18:58:06 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2018-11-13 18:58:06 (GMT)
commitc2aba592affffdb12d2f95e251ccfc566b6dd674 (patch)
tree3f1719afc1ec7408135659f154f4b4072f8b44af /test/Java/swig-dependencies.py
parentade84bc59db524fbccd670bfadefa786407c7c0b (diff)
parent648cf42a89845ccad012e02609ca8958e62ce272 (diff)
downloadSCons-c2aba592affffdb12d2f95e251ccfc566b6dd674.zip
SCons-c2aba592affffdb12d2f95e251ccfc566b6dd674.tar.gz
SCons-c2aba592affffdb12d2f95e251ccfc566b6dd674.tar.bz2
Merge remote-tracking branch 'upstream/master' into subst_rewrite
Diffstat (limited to 'test/Java/swig-dependencies.py')
-rw-r--r--test/Java/swig-dependencies.py28
1 files changed, 20 insertions, 8 deletions
diff --git a/test/Java/swig-dependencies.py b/test/Java/swig-dependencies.py
index bd7a576..a3af9ec 100644
--- a/test/Java/swig-dependencies.py
+++ b/test/Java/swig-dependencies.py
@@ -40,7 +40,6 @@ if not swig:
where_javac, java_version = test.java_where_javac()
where_javah = test.java_where_javah()
-#where_jar = test.java_where_jar()
where_java_include=test.java_where_includes()
@@ -51,12 +50,10 @@ test.subdir(['foo'],
test.write(['SConstruct'], """\
import os
-env = Environment(ENV = os.environ,
- CPPPATH=%(where_java_include)s,
- JAVAC = r'%(where_javac)s',
- JAVAH = r'%(where_javah)s')
-
-env.Append(CPPFLAGS = ' -g -Wall')
+env = Environment(ENV = os.environ)
+if env['PLATFORM'] != 'win32':
+ env.Append(CPPFLAGS = ' -g -Wall')
+env['CPPPATH'] ='$JAVAINCLUDES'
Export('env')
@@ -79,13 +76,28 @@ int fooAdd(int a, int b) {
""")
test.write(['foo', 'foo.h'], """\
+#ifdef _MSC_VER
+__declspec(dllexport)
+#endif
int fooAdd(int, int);
""")
test.write(['java', 'Java_foo_interface.i'], """\
#include "foo.h"
+#include <windows.i>
+
%module foopack
+
+%{
+
+#ifdef _MSC_VER
+__declspec(dllexport)
+#endif
+int hello(){
+ return 1;
+}
+%}
""")
test.write(['java', 'SConscript'], """\
@@ -103,7 +115,7 @@ libadd = ['foo',]
libpath = ['#foo',]
#swigflags = '-c++ -java -Wall -package foopack -Ifoo'
-swigflags = '-c++ -java -Wall -Ifoo'
+swigflags = '-c++ -java -Wall -Ifoo -DTEST_$PLATFORM'
Java_foo_interface = env.SharedLibrary(
'Java_foo_interface',