You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by cl...@apache.org on 2010/11/24 22:58:05 UTC

svn commit: r1038844 - in /thrift/trunk: compiler/cpp/Makefile.am compiler/cpp/src/thriftl.ll lib/cpp/Makefile.am lib/cpp/test/Makefile.am

Author: clavoie
Date: Wed Nov 24 21:58:05 2010
New Revision: 1038844

URL: http://svn.apache.org/viewvc?rev=1038844&view=rev
Log:
THRIFT-916: Commit a partial fix for flex-generated code infested with warnings on Mac OS X

Modified:
    thrift/trunk/compiler/cpp/Makefile.am
    thrift/trunk/compiler/cpp/src/thriftl.ll
    thrift/trunk/lib/cpp/Makefile.am
    thrift/trunk/lib/cpp/test/Makefile.am

Modified: thrift/trunk/compiler/cpp/Makefile.am
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/Makefile.am?rev=1038844&r1=1038843&r2=1038844&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/Makefile.am (original)
+++ thrift/trunk/compiler/cpp/Makefile.am Wed Nov 24 21:58:05 2010
@@ -26,11 +26,11 @@ BUILT_SOURCES =
 
 bin_PROGRAMS = thrift
 
+noinst_LIBRARIES = libparse.a
+
 thrift_OBJDIR = obj
 
-thrift_SOURCES = src/thrifty.yy \
-                 src/thriftl.ll \
-                 src/main.cc \
+thrift_SOURCES = src/main.cc \
                  src/md5.c \
                  src/generate/t_generator.cc \
                  src/generate/t_generator_registry.h \
@@ -115,10 +115,15 @@ if THRIFT_GEN_javame
 thrift_SOURCES += src/generate/t_javame_generator.cc
 endif
 
-thrift_CXXFLAGS = -Wall -I$(srcdir)/src
-thrift_LDFLAGS = -Wall
+thrift_CPPFLAGS = -I$(srcdir)/src
+thrift_CXXFLAGS = -Wall
+thrift_LDADD = @LEXLIB@ libparse.a
+
+libparse_a_CPPFLAGS = -I$(srcdir)/src
+libparse_a_CXXFLAGS = -Wall -Wno-sign-compare -Wno-unused
 
-thrift_LDADD = @LEXLIB@
+libparse_a_SOURCES = src/thrifty.yy \
+                     src/thriftl.ll
 
 EXTRA_DIST = README
 

Modified: thrift/trunk/compiler/cpp/src/thriftl.ll
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/thriftl.ll?rev=1038844&r1=1038843&r2=1038844&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/thriftl.ll (original)
+++ thrift/trunk/compiler/cpp/src/thriftl.ll Wed Nov 24 21:58:05 2010
@@ -25,6 +25,14 @@
 
 %{
 
+/* This is redundant with some of the flags in Makefile.am, but it works
+ * when people override CXXFLAGS without being careful. The pragmas are
+ * the 'right' way to do it, but don't work on old-enough GCC (in particular
+ * the GCC that ship on Mac OS X 10.6.5, *counter* to what the GNU docs say)
+ *
+ * We should revert the Makefile.am changes once Apple ships a reasonable
+ * GCC.
+ */
 #pragma GCC diagnostic ignored "-Wunused-function"
 #pragma GCC diagnostic ignored "-Wunused-label"
 

Modified: thrift/trunk/lib/cpp/Makefile.am
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/Makefile.am?rev=1038844&r1=1038843&r2=1038844&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/Makefile.am (original)
+++ thrift/trunk/lib/cpp/Makefile.am Wed Nov 24 21:58:05 2010
@@ -80,7 +80,8 @@ libthriftz_la_SOURCES = src/transport/TZ
 # Flags for the various libraries
 libthriftnb_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEVENT_CPPFLAGS)
 libthriftz_la_CPPFLAGS  = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
-
+libthriftnb_la_CXXFLAGS = $(AM_CXXFLAGS)
+libthriftz_la_CXXFLAGS  = $(AM_CXXFLAGS)
 
 include_thriftdir = $(includedir)/thrift
 include_thrift_HEADERS = \

Modified: thrift/trunk/lib/cpp/test/Makefile.am
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/test/Makefile.am?rev=1038844&r1=1038843&r2=1038844&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/test/Makefile.am (original)
+++ thrift/trunk/lib/cpp/test/Makefile.am Wed Nov 24 21:58:05 2010
@@ -176,6 +176,7 @@ INCLUDES = \
 	-I$(top_srcdir)/lib/cpp/src
 
 AM_CPPFLAGS = $(BOOST_CPPFLAGS)
+AM_CXXFLAGS = -Wall
 
 clean-local:
 	$(RM) -r gen-cpp