From: NAKAMURA Takumi Date: Tue, 9 Jul 2013 11:14:24 +0000 (+0000) Subject: c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with -Wdocumentation. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b8f6211956f55c9aa95a2f8145da79c46c5374b;p=clang 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? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185927 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/c-index-test/Makefile b/tools/c-index-test/Makefile index 4df90e62ab..5aaabefdf6 100644 --- a/tools/c-index-test/Makefile +++ b/tools/c-index-test/Makefile @@ -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