]> sigrok.org Git - libsigrok.git/commitdiff
SWIG: Define "noexcept" empty to work around SWIG bug
authorDaniel Elstner <redacted>
Sun, 11 Oct 2015 10:12:28 +0000 (12:12 +0200)
committerDaniel Elstner <redacted>
Mon, 26 Oct 2015 05:45:56 +0000 (06:45 +0100)
The SWIG 2.0.12 on my system bails out with a syntax error on the
"noexcept" keyword in C++11 code. Define "noexcept" to nothing (for
the SWIG parser only) to work around this problem.

Makefile.am
bindings/python/setup.py

index fb925ce6a1a530ddcb063bc92830dd95cc450f1d..582b38f7d47107689c7871add24440cf6d14801f 100644 (file)
@@ -651,7 +651,7 @@ $(JCXX): $(srcdir)/$(JSWG) $(JDOC) bindings/swig/classes.i bindings/swig/enums.i
                $(bindings_cxx_libsigrokcxx_la_include_HEADERS) \
                $(nodist_bindings_cxx_libsigrokcxx_la_include_HEADERS)
        -$(AM_V_at)rm -f $(java_cleanfiles)
-       $(AM_V_GEN)$(SWIG) -c++ -java -package org.sigrok.core.classes \
+       $(AM_V_GEN)$(SWIG) -c++ -Dnoexcept= -java -package org.sigrok.core.classes \
                -Ibindings -I$(JCLS) $(local_includes) -I$(srcdir) $(JNI_CPPFLAGS) \
                -outdir $(JCLS) -o $@ $(srcdir)/$(JSWG)
 
index 3fb0474a6c91038d5eeda23c1cc6dbd6f270f960..c70fffca25634f11168bc5844cd39304b44b4dfc 100644 (file)
@@ -87,8 +87,8 @@ setup(
     ext_modules = [
         Extension('sigrok.core._classes',
             sources = [vpath('sigrok/core/classes.i')],
-            swig_opts = ['-c++', '-threads', '-Isigrok/core', '-I..', '-I' + srcdir_parent] +
-                ['-I%s' % i for i in includes],
+            swig_opts = ['-c++', '-threads', '-Dnoexcept=', '-Isigrok/core',
+                '-I..', '-I' + srcdir_parent] + ['-I%s' % i for i in includes],
             extra_compile_args = ['-Wno-uninitialized'],
             include_dirs = includes,
             library_dirs = libdirs,