From 6e96965fdb19755489c0d35dee6d7fe868477b55 Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Tue, 13 Dec 2011 00:36:01 +0000 Subject: [PATCH] THRIFT-1462 add more strict compiler flags FIX: check for MINGW and use reduced compiler flag set for mingw git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213523 13f79535-47bb-0310-9956-ffa450edef68 --- compiler/cpp/Makefile.am | 6 ++++++ configure.ac | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am index 1787656a..28813dcf 100644 --- a/compiler/cpp/Makefile.am +++ b/compiler/cpp/Makefile.am @@ -86,7 +86,13 @@ thrift_SOURCES += src/generate/t_c_glib_generator.cc \ 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 diff --git a/configure.ac b/configure.ac index 37d9d755..aa8a16ea 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.17.1