From 442cb95d29a487df09e264b99218cd1519f51500 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 30 Aug 2019 00:47:54 +0200 Subject: [PATCH] CMake: Add argument -DXML_LARGE_SIZE=ON --- expat/CMakeLists.txt | 7 +++++++ expat/Changes | 1 + 2 files changed, 8 insertions(+) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index b004cdbc..9730bf00 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -62,6 +62,7 @@ endif() option(XML_UNICODE "Use UTF-16 encoded chars (two bytes) instead of UTF-8" OFF) option(XML_UNICODE_WCHAR_T "Use wchar_t to represent UTF-16 instead of unsigned short" OFF) option(XML_ATTR_INFO "Define to allow retrieving the byte offsets for attribute names and values" OFF) +option(XML_LARGE_SIZE "Make XML_GetCurrent* functions return <(unsigned) long long> rather than <(unsigned) long>" OFF) if(MSVC) set(MSVC_USE_STATIC_CRT OFF CACHE BOOL "Use /MT flag (static CRT) when compiling in MSVC") endif() @@ -96,10 +97,15 @@ endmacro() expat_bool_to_int(XML_ATTR_INFO) expat_bool_to_int(XML_DTD) +expat_bool_to_int(XML_LARGE_SIZE) expat_bool_to_int(XML_NS) expat_bool_to_int(XML_UNICODE) expat_bool_to_int(XML_UNICODE_WCHAR_T) +if(XML_LARGE_SIZE) + add_definitions(-DXML_LARGE_SIZE) +endif() + if(XML_UNICODE_WCHAR_T AND NOT XML_UNICODE) message(SEND_ERROR "Option XML_UNICODE_WCHAR_T=ON may not be used without XML_UNICODE=ON.") set(XML_UNICODE 1) @@ -409,6 +415,7 @@ message(STATUS " Features") message(STATUS " Attributes info .......... ${XML_ATTR_INFO}") message(STATUS " Context bytes ............ ${XML_CONTEXT_BYTES}") message(STATUS " DTD support .............. ${XML_DTD}") +message(STATUS " Large size ............... ${XML_LARGE_SIZE}") message(STATUS " Namespace support ........ ${XML_NS}") message(STATUS "") message(STATUS " Entropy sources") diff --git a/expat/Changes b/expat/Changes index 47c5da15..d50ec869 100644 --- a/expat/Changes +++ b/expat/Changes @@ -27,6 +27,7 @@ Release x.x.x xxx xxx xx xxxx #239 #277 CMake: Add arguments -DUSE_GETRANDOM=(ON|OFF|AUTO) -DUSE_SYS_GETRANDOM=(ON|OFF|AUTO) + CMake: Add argument -DXML_LARGE_SIZE=ON CMake: Install expat_config.h to include directory CMake: Now produces a summary of applied configuration CMake: Require C++ compiler only when tests are enabled