update swig on windows

This commit is contained in:
Bassem Girgis
2019-08-04 21:38:19 -05:00
parent 8414b7136b
commit 76ad52be58
5943 changed files with 91790 additions and 71892 deletions

View File

@@ -0,0 +1,26 @@
TOP = ../../..
SWIGEXE = $(TOP)/../swig
SWIG_LIB_DIR = $(TOP)/../$(TOP_BUILDDIR_TO_TOP_SRCDIR)Lib
CXXSRCS =
TARGET = Simple
INTERFACE = Simple.i
build:
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
SWIGOPT='-module Simple_baseline' TARGET='$(TARGET)_baseline' INTERFACE='$(INTERFACE)' python_cpp
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
SWIGOPT='-O -module Simple_optimized' TARGET='$(TARGET)_optimized' INTERFACE='$(INTERFACE)' python_cpp
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
SWIGOPT='-builtin -O -module Simple_builtin' TARGET='$(TARGET)_builtin' INTERFACE='$(INTERFACE)' python_cpp
static:
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
TARGET='mypython' INTERFACE='$(INTERFACE)' python_cpp_static
clean:
$(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' TARGET='$(TARGET)' python_clean
rm -f $(TARGET)_*.py

View File

@@ -0,0 +1,52 @@
%inline %{
class A {
public:
A () {}
~A () {}
void func () {}
};
class B : public A {
public:
B () {}
~B () {}
};
class C : public B {
public:
C () {}
~C () {}
};
class D : public C {
public:
D () {}
~D () {}
};
class E : public D {
public:
E () {}
~E () {}
};
class F : public E {
public:
F () {}
~F () {}
};
class G : public F {
public:
G () {}
~G () {}
};
class H : public G {
public:
H () {}
~H () {}
};
%}

View File

@@ -0,0 +1,11 @@
import sys
sys.path.append('..')
import harness
def proc(mod):
x = mod.H()
for i in range(10000000):
x.func()
harness.run(proc)