]> granicus.if.org Git - clang/commitdiff
c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with -Wdocumentation.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 9 Jul 2013 11:14:24 +0000 (11:14 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 9 Jul 2013 11:14:24 +0000 (11:14 +0000)
-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?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185927 91177308-0d34-0410-b5e6-96231b3b80d8

tools/c-index-test/Makefile

index 4df90e62abe89046baee89917d3ebaa3672f234c..5aaabefdf6f489dc607dad1a6ef70ba57bf10374 100644 (file)
@@ -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