r185927 - c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with -Wdocumentation.

NAKAMURA Takumi geek4civic at gmail.com
Tue Jul 9 04:14:24 PDT 2013


Author: chapuni
Date: Tue Jul  9 06:14:24 2013
New Revision: 185927

URL: http://llvm.org/viewvc/llvm-project?rev=185927&view=rev
Log:
c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with -Wdocumentation.

-Wdocumentation won't seek -isystem. LIBXML2's headers in a certain distro might be incompatible to -Wdocumentation.

FIXME: Could autoconf detect clang or availability of -isystem?

Modified:
    cfe/trunk/tools/c-index-test/Makefile

Modified: cfe/trunk/tools/c-index-test/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/Makefile?rev=185927&r1=185926&r2=185927&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/Makefile (original)
+++ cfe/trunk/tools/c-index-test/Makefile Tue Jul  9 06:14:24 2013
@@ -37,4 +37,12 @@ USEDLIBS = clang.a \
 include $(CLANG_LEVEL)/Makefile
 
 LIBS += $(LIBXML2_LIBS)
+
+# Headers in $(LIBXML2_INC) should not be checked with clang's -Wdocumentation.
+# Use -isystem instead of -I then.
+# FIXME: Could autoconf detect clang or availability of -isystem?
+ifneq ($(findstring -Wdocumentation,$(OPTIMIZE_OPTION)),)
+CPPFLAGS += $(subst -I,-isystem ,$(LIBXML2_INC))
+else
 CPPFLAGS += $(LIBXML2_INC)
+endif





More information about the cfe-commits mailing list