aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-10 10:30:55 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-02-10 10:35:27 +0000
commite5a3c1e28cb862376bc441cee1dcef92a865e534 (patch)
treebbf72c0e6cf6a467d1f16680b00084a3d946ec78
parent940e32477dba502a98477960d5a0d1385f7e2edb (diff)
downloadswig-e5a3c1e28cb862376bc441cee1dcef92a865e534.tar.gz
MzScheme and Travis CXXFLAGS/CFLAGS support
mzc seems to use the CFLAGS, but not the CXXFLAGS env variables. Pass the CXXFLAGS as ++ccf options when compiling c++.
-rw-r--r--Examples/Makefile.in4
-rwxr-xr-xTools/testflags.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index c5dcb1ee1..7022166a0 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -821,12 +821,12 @@ MZSCHEME_SCRIPT = $(SRCDIR)$(RUNME).scm
mzscheme: $(SRCDIR_SRCS)
$(SWIG) -mzscheme $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
- $(COMPILETOOL) $(MZC) `echo $(CPPFLAGS) $(INCLUDES) | sed 's/-I/++ccf -I/g'` --cc $(ISRCS) $(SRCDIR_SRCS)
+ $(COMPILETOOL) $(MZC) `echo " $(CPPFLAGS) $(INCLUDES) $(CFLAGS)" | sed 's/ -/ ++ccf -/g'` --cc $(ISRCS) $(SRCDIR_SRCS)
$(COMPILETOOL) $(MZC) --ld $(TARGET)$(MZSCHEME_SO) $(OBJS) $(IOBJS)
mzscheme_cpp: $(SRCDIR_SRCS)
$(SWIG) -mzscheme -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
- $(COMPILETOOL) $(MZC) `echo $(CPPFLAGS) $(INCLUDES) | sed 's/-I/++ccf -I/g'` --cc $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS)
+ env CFLAGS= $(COMPILETOOL) $(MZC) `echo " $(CPPFLAGS) $(INCLUDES) $(CXXFLAGS)" | sed 's/ -/ ++ccf -/g'` --cc $(ICXXSRCS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS)
$(CXXSHARED) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $(LIBPREFIX)$(TARGET)$(MZSCHEME_SO) $(OBJS) $(IOBJS) $(MZDYNOBJ) $(CPP_DLLIBS)
# -----------------------------------------------------------------
diff --git a/Tools/testflags.py b/Tools/testflags.py
index ac8048e5f..bf85f5680 100755
--- a/Tools/testflags.py
+++ b/Tools/testflags.py
@@ -12,6 +12,7 @@ def get_cflags(language, std, compiler):
"java":"-Werror " + c_common,
"javascript":"-Werror " + c_common,
"lua":"-Werror " + c_common,
+ "mzscheme":"-Werror " + c_common,
"ocaml":"-Werror " + c_common,
"octave":"-Werror " + c_common,
"perl5":"-Werror " + c_common,
@@ -42,6 +43,7 @@ def get_cxxflags(language, std, compiler):
"java":"-Werror " + cxx_common,
"javascript":"-Werror " + cxx_common + " -Wno-error=unused-function", # Until overload_rename is fixed for node
"lua":"-Werror " + cxx_common,
+ "mzscheme":"-Werror " + cxx_common,
"ocaml":"-Werror " + cxx_common,
"octave":"-Werror " + cxx_common,
"perl5":"-Werror " + cxx_common,