aboutsummaryrefslogtreecommitdiffstats
path: root/utils/unittest/UnitTestMain/Makefile
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-20 06:17:12 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-20 06:17:12 +0000
commit848454aedee3009026433cdc6f7298edf40e45a1 (patch)
tree4af2617a7e4b9e80b1e41d70a460c6733190385a /utils/unittest/UnitTestMain/Makefile
parentbc2d9d3de51368091601dcd34ae9556d4f9f52c0 (diff)
downloadexternal_llvm-848454aedee3009026433cdc6f7298edf40e45a1.zip
external_llvm-848454aedee3009026433cdc6f7298edf40e45a1.tar.gz
external_llvm-848454aedee3009026433cdc6f7298edf40e45a1.tar.bz2
Follow googletest logic for suppressing warnings in unittests/UnitTestMain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/unittest/UnitTestMain/Makefile')
-rw-r--r--utils/unittest/UnitTestMain/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/unittest/UnitTestMain/Makefile b/utils/unittest/UnitTestMain/Makefile
index 07a74e3..aadff21 100644
--- a/utils/unittest/UnitTestMain/Makefile
+++ b/utils/unittest/UnitTestMain/Makefile
@@ -10,10 +10,12 @@
LEVEL = ../../..
include $(LEVEL)/Makefile.config
+NO_MISSING_FIELD_INITIALIZERS := $(shell $(CXX) -Wno-missing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers)
+NO_VARIADIC_MACROS := $(shell $(CXX) -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros)
LIBRARYNAME = UnitTestMain
BUILD_ARCHIVE = 1
CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include
-CPP.Flags += -Wno-variadic-macros
+CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS)
include $(LEVEL)/Makefile.common