diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index fcd5dd556676..274de31c9efa 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -294,6 +294,11 @@ else() set(ENABLE_PIC 0) endif() +find_package(LibXml2) +if (LIBXML2_FOUND) + set(CLANG_HAVE_LIBXML 1) +endif () + include(CheckCXXCompilerFlag) check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG) diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index ca6412472991..ff765ccd373b 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -6,6 +6,9 @@ /* Bug report URL. */ #define BUG_REPORT_URL "${BUG_REPORT_URL}" +/* Define if we have libxml2 */ +#cmakedefine CLANG_HAVE_LIBXML ${CLANG_HAVE_LIBXML} + /* Relative directory for resource files */ #define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}"