[Groonga-commit] groonga/groonga [master] [test][c++] add -Wno-clobbered flags for building tests.

Back to archive index

null+****@clear***** null+****@clear*****
2012年 1月 11日 (水) 14:01:47 JST


Kouhei Sutou	2012-01-11 14:01:47 +0900 (Wed, 11 Jan 2012)

  New Revision: e71b8fd338eb74165b67c070eec907de8fd3886e

  Log:
    [test][c++] add -Wno-clobbered flags for building tests.

  Modified files:
    configure.ac
    test/unit/core/dat/Makefile.am

  Modified: configure.ac (+9 -0)
===================================================================
--- configure.ac    2012-01-11 13:24:08 +0900 (af1f85e)
+++ configure.ac    2012-01-11 14:01:47 +0900 (7c14618)
@@ -117,6 +117,7 @@ AC_DEFUN([REMOVE_CXXFLAG], [
   AC_MSG_RESULT([$remove_cxxflag])
 ])
 
+TEST_CXXFLAGS=""
 if test "$GCC" = "yes"; then
   CHECK_BUILD_FLAG([-Wall])
   CHECK_BUILD_FLAG([-Wextra])
@@ -148,7 +149,15 @@ if test "$GCC" = "yes"; then
 
   CHECK_CXXFLAG([-fexceptions])
   CHECK_CXXFLAG([-fimplicit-templates])
+
+  CXXFLAGS_for_source="$CXXFLAGS"
+  CHECK_CXXFLAG([-Wno-clobbered])
+  if test "x$check_cxxflag" = "xyes"; then
+    TEST_CXXFLAGS="-Wno-clobbered"
+  fi
+  CXXFLAGS="$CXXFLAGS_for_source"
 fi
+AC_SUBST(TEST_CXXFLAGS)
 
 AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL

  Modified: test/unit/core/dat/Makefile.am (+1 -0)
===================================================================
--- test/unit/core/dat/Makefile.am    2012-01-11 13:24:08 +0900 (71bf899)
+++ test/unit/core/dat/Makefile.am    2012-01-11 14:01:47 +0900 (895959b)
@@ -31,6 +31,7 @@ INCLUDES =					\
 AM_CXXFLAGS =						\
 	$(GCUTTER_CFLAGS)				\
 	$(CPPCUTTER_CFLAGS)				\
+	$(TEST_CXXFLAGS)				\
 	-DGROONGA=\"$(abs_top_builddir)/src/groonga\"
 
 AM_LDFLAGS = -module -rpath $(libdir) -avoid-version




Groonga-commit メーリングリストの案内
Back to archive index