Enable XML_ATTR_INFO in build

enable XML_ATTR_INFO in build to cover XML_ATTR_INFO in CI

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
This commit is contained in:
Mohammed Khajapasha 2019-06-19 09:30:47 +00:00 committed by Sebastian Pipping
parent 9c90d3db3a
commit 4a2eb0b7f0
4 changed files with 26 additions and 2 deletions

View File

@ -60,6 +60,7 @@ if(NOT WIN32)
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)
if(XML_DTD)
set(XML_DTD 1)
@ -81,6 +82,11 @@ if(XML_UNICODE_WCHAR_T)
else(XML_UNICODE_WCHAR_T)
set(XML_UNICODE_WCHAR_T 0)
endif(XML_UNICODE_WCHAR_T)
if(XML_ATTR_INFO)
set(XML_ATTR_INFO 1)
else(XML_ATTR_INFO)
set(XML_ATTR_INFO 0)
endif(XML_ATTR_INFO)
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.")

View File

@ -222,6 +222,15 @@ AC_DEFINE([XML_DTD], 1,
AC_DEFINE([XML_DEV_URANDOM], 1,
[Define to include code reading entropy from `/dev/urandom'.])
AC_ARG_ENABLE([xml-attr-info],
[AS_HELP_STRING([--enable-xml-attr-info],
[Enable retrieving the byte offsets for attribute names and values
(default is disabled)])], ,
[enable_xml_attr_info=no])
AS_IF([test "x${enable_xml_attr_info}" = "xyes"],
[AC_DEFINE([XML_ATTR_INFO], 1,
[Define to allow retrieving the byte offsets for attribute names and values.])])
AC_ARG_ENABLE([xml-context],
AS_HELP_STRING([--enable-xml-context @<:@COUNT@:>@],
[Retain context around the current parse point;

View File

@ -41,6 +41,10 @@ _configure() {
${unicode_enabled} \
&& configure_args+=( CPPFLAGS='-DXML_UNICODE -DXML_UNICODE_WCHAR_T' )
if [[ "${xml_attr_info}" = true ]]; then
configure_args+=( --enable-xml-attr-info )
fi
if [[ ${xml_context} -eq 0 ]]; then
configure_args+=( --disable-xml-context )
else
@ -211,8 +215,10 @@ _main() {
continue
fi
for xml_context in 0 1024 ; do
_build_case
for xml_attr_info in true false ; do
for xml_context in 0 1024 ; do
_build_case
done
done
done
done

View File

@ -99,6 +99,9 @@
/* Define to use wchar_t as UTF-16 char type instead of unsigned short. */
#cmakedefine XML_UNICODE_WCHAR_T
/* Define to allow retrieving the byte offsets for attribute names and values. */
#cmakedefine XML_ATTR_INFO
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
#ifdef _MSC_VER
# define __func__ __FUNCTION__