You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2011/12/13 01:36:02 UTC

svn commit: r1213523 - in /thrift/trunk: compiler/cpp/Makefile.am configure.ac

Author: roger
Date: Tue Dec 13 00:36:01 2011
New Revision: 1213523

URL: http://svn.apache.org/viewvc?rev=1213523&view=rev
Log:
THRIFT-1462 add more strict compiler flags
FIX: check for MINGW and use reduced compiler flag set for mingw

Modified:
    thrift/trunk/compiler/cpp/Makefile.am
    thrift/trunk/configure.ac

Modified: thrift/trunk/compiler/cpp/Makefile.am
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/Makefile.am?rev=1213523&r1=1213522&r2=1213523&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/Makefile.am (original)
+++ thrift/trunk/compiler/cpp/Makefile.am Tue Dec 13 00:36:01 2011
@@ -86,7 +86,13 @@ thrift_SOURCES += src/generate/t_c_glib_
                   src/generate/t_go_generator.cc
 
 thrift_CPPFLAGS = -I$(srcdir)/src
+
+if MINGW
+thrift_CXXFLAGS = -Wall
+else
 thrift_CXXFLAGS = -Wall -Wextra -std=c++0x -pedantic
+endif
+
 thrift_LDADD = @LEXLIB@ libparse.a
 
 libparse_a_CPPFLAGS = -I$(srcdir)/src

Modified: thrift/trunk/configure.ac
URL: http://svn.apache.org/viewvc/thrift/trunk/configure.ac?rev=1213523&r1=1213522&r2=1213523&view=diff
==============================================================================
--- thrift/trunk/configure.ac (original)
+++ thrift/trunk/configure.ac Tue Dec 13 00:36:01 2011
@@ -283,6 +283,18 @@ if test "$with_tests" = "no"; then
 fi
 AM_CONDITIONAL(WITH_TESTS, [test "$have_tests" = "yes"])
 
+AM_CONDITIONAL(MINGW, false)
+case "${host_os}" in
+*mingw*)
+  mingw32_support="yes"
+  AC_CHECK_HEADER(windows.h)
+  AM_CONDITIONAL(MINGW, true)
+  ;;
+*)
+  AC_ISC_POSIX
+  ;;
+esac
+
 AC_C_CONST
 AC_C_INLINE
 AC_C_VOLATILE