[llvm-commits] [llvm] r64514 - /llvm/branches/release_25/utils/unittest/googletest/Makefile

Tanya Lattner tonic at nondot.org
Fri Feb 13 16:43:29 PST 2009


Author: tbrethou
Date: Fri Feb 13 18:43:29 2009
New Revision: 64514

URL: http://llvm.org/viewvc/llvm-project?rev=64514&view=rev
Log:
Merge from mainline.
Probe for flags before using them to try to help compiling with
compilers that don't support those flags.  This hopefully will help
gcc 3.X compile this code.  http://llvm.org/PR3487


Modified:
    llvm/branches/release_25/utils/unittest/googletest/Makefile

Modified: llvm/branches/release_25/utils/unittest/googletest/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_25/utils/unittest/googletest/Makefile?rev=64514&r1=64513&r2=64514&view=diff

==============================================================================
--- llvm/branches/release_25/utils/unittest/googletest/Makefile (original)
+++ llvm/branches/release_25/utils/unittest/googletest/Makefile Fri Feb 13 18:43:29 2009
@@ -9,10 +9,13 @@
 
 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_VAROADIC_MACROS := $(shell $(CXX) -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros)
+
 
 LIBRARYNAME = GoogleTest
 BUILD_ARCHIVE = 1
 CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include/
-CPP.Flags += -Wno-missing-field-initializers -Wno-variadic-macros
+CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VAROADIC_MACROS)
 
 include $(LEVEL)/Makefile.common





More information about the llvm-commits mailing list