From 63cab6c9d2f8c54f599c4b2ec6b2530ca3b585e1 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 14 Dec 2012 18:30:20 +0000 Subject: [PATCH] [CMake] Move libxml2 stuff from clang to llvm/cmake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170225 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/config-ix.cmake | 5 +++++ include/llvm/Config/config.h.cmake | 3 +++ 2 files changed, 8 insertions(+) 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}"