Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/expat/dist Import expat 2.2.8



details:   https://anonhg.NetBSD.org/src/rev/1f21fc761724
branches:  trunk
changeset: 454422:1f21fc761724
user:      maya <maya%NetBSD.org@localhost>
date:      Mon Sep 16 06:19:03 2019 +0000

description:
Import expat 2.2.8

Release 2.2.8 Fri Septemper 13 2019
        Security fixes:
       #317 #318  CVE-2019-15903 -- Fix heap overflow triggered by
                    XML_GetCurrentLineNumber (or XML_GetCurrentColumnNumber),
                    and deny internal entities closing the doctype;
                    fixed in commit c20b758c332d9a13afbbb276d30db1d183a85d43

        Bug fixes:
            #240  Fix cases where XML_StopParser did not have any effect
                    when called from inside of an end element handler
            #341  xmlwf: Fix exit code for operation without "-d DIRECTORY";
                    previously, only "-d DIRECTORY" would give you a proper
                    exit code:
                      # xmlwf -d . <<<'<not well-formed>' 2>/dev/null ; echo $?
                      2
                      # xmlwf <<<'<not well-formed>' 2>/dev/null ; echo $?
                      0
                    Now both cases return exit code 2.

        Other changes:
       #299 #302  Windows: Replace LoadLibrary hack to access
                    unofficial API function SystemFunction036 (RtlGenRandom)
                    by using official API function rand_s (needs WinXP+)
            #325  Windows: Drop support for Visual Studio <=7.1/2003
                    and document supported compilers in README.md
            #286  Windows: Remove COM code from xmlwf; in case it turns
                    out needed later, there will be a dedicated repository
                    below https://github.com/libexpat/ for that code
            #322  Windows: Remove explicit MSVC solution and project files.
                    You can generate Visual Studio solution files through
                    CMake, e.g.: cmake -G"Visual Studio 15 2017" .
            #338  xmlwf: Make "xmlwf -h" help output more friendly
            #339  examples: Improve elements.c
       #244 #264  Autotools: Add argument --enable-xml-attr-info
       #239 #301  Autotools: Add arguments
                    --with-getrandom
                    --without-getrandom
                    --with-sys-getrandom
                    --without-sys-getrandom
       #312 #343  Autotools: Fix linking issues with "./configure LD=clang"
                  Autotools: Fix "make run-xmltest" for out-of-source builds
       #329 #336  CMake: Pull all options from Expat <=2.2.7 into namespace
                    prefix EXPAT_ with the exception of DOCBOOK_TO_MAN:
                    - BUILD_doc            -> EXPAT_BUILD_DOCS (plural)
                    - BUILD_examples       -> EXPAT_BUILD_EXAMPLES
                    - BUILD_shared         -> EXPAT_SHARED_LIBS
                    - BUILD_tests          -> EXPAT_BUILD_TESTS
                    - BUILD_tools          -> EXPAT_BUILD_TOOLS
                    - DOCBOOK_TO_MAN       -> DOCBOOK_TO_MAN (unchanged)
                    - INSTALL              -> EXPAT_ENABLE_INSTALL
                    - MSVC_USE_STATIC_CRT  -> EXPAT_MSVC_STATIC_CRT
                    - USE_libbsd           -> EXPAT_WITH_LIBBSD
                    - WARNINGS_AS_ERRORS   -> EXPAT_WARNINGS_AS_ERRORS
                    - XML_CONTEXT_BYTES    -> EXPAT_CONTEXT_BYTES
                    - XML_DEV_URANDOM      -> EXPAT_DEV_URANDOM
                    - XML_DTD              -> EXPAT_DTD
                    - XML_NS               -> EXPAT_NS
                    - XML_UNICODE          -> EXPAT_CHAR_TYPE=ushort (!)
                    - XML_UNICODE_WCHAR_T  -> EXPAT_CHAR_TYPE=wchar_t (!)
       #244 #264  CMake: Add argument -DEXPAT_ATTR_INFO=(ON|OFF),
                    default OFF
            #326  CMake: Add argument -DEXPAT_LARGE_SIZE=(ON|OFF),
                    default OFF
            #328  CMake: Add argument -DEXPAT_MIN_SIZE=(ON|OFF),
                    default OFF
       #239 #277  CMake: Add arguments
                    -DEXPAT_WITH_GETRANDOM=(ON|OFF|AUTO), default AUTO
                    -DEXPAT_WITH_SYS_GETRANDOM=(ON|OFF|AUTO), default AUTO
            #326  CMake: Install expat_config.h to include directory
            #326  CMake: Generate and install configuration files for
                    future find_package(expat [..] CONFIG [..])
                  CMake: Now produces a summary of applied configuration
                  CMake: Require C++ compiler only when tests are enabled
            #330  CMake: Fix compilation for 16bit character types,
                    i.e. ex -DXML_UNICODE=ON (and ex -DXML_UNICODE_WCHAR_T=ON)
            #265  CMake: Fix linking with MinGW
            #330  CMake: Add full support for MinGW; to enable, use
                    -DCMAKE_TOOLCHAIN_FILE=[expat]/cmake/mingw-toolchain.cmake
            #330  CMake: Port "make run-xmltest" from GNU Autotools to CMake
            #316  CMake: Windows: Make binary postfix match MSVC
                    Old: expat[d].lib
                    New: expat[w][d][MD|MT].lib
                  CMake: Migrate files from Windows to Unix line endings
            #308  CMake: Integrate OSS-Fuzz fuzzers, option
                    -DEXPAT_BUILD_FUZZERS=(ON|OFF), default OFF
             #14  Drop an OpenVMS support leftover
    #235 #268 ..
    #270 #310 ..
  #313 #331 #333  Address compiler warnings
    #282 #283 ..
       #284 #285  Address cppcheck warnings
       #294 #295  Address Clang Static Analyzer warnings
        #24 #293  Mass-apply clang-format 9 (and ensure conformance during CI)
                  Version info bumped from 7:9:6 to 7:10:6

        Special thanks to:
            David Loffredo
            Joonun Jang
            Khajapasha Mohammed
            Kishore Kunche
            Marco Maggi
            Mitch Phillips
            Rolf Ade
            xantares
            Zhongyuan Zhou

diffstat:

 external/mit/expat/dist/CMake.README                                       |     84 +-
 external/mit/expat/dist/CMakeLists.txt                                     |    736 +-
 external/mit/expat/dist/Changes                                            |    354 +-
 external/mit/expat/dist/ConfigureChecks.cmake                              |    110 +-
 external/mit/expat/dist/Makefile.am                                        |    154 +
 external/mit/expat/dist/Makefile.in                                        |   1201 +-
 external/mit/expat/dist/README.md                                          |    188 +
 external/mit/expat/dist/acinclude.m4                                       |     12 +
 external/mit/expat/dist/aclocal.m4                                         |   1186 +-
 external/mit/expat/dist/cmake/expat-config.cmake.in                        |     75 +
 external/mit/expat/dist/cmake/mingw-toolchain.cmake                        |     36 +
 external/mit/expat/dist/configure                                          |   4895 ++-
 external/mit/expat/dist/configure.ac                                       |    388 +-
 external/mit/expat/dist/conftools/ar-lib                                   |    270 +
 external/mit/expat/dist/conftools/ax-append-compile-flags.m4               |     46 +
 external/mit/expat/dist/conftools/ax-append-flag.m4                        |     50 +
 external/mit/expat/dist/conftools/ax-append-link-flags.m4                  |     44 +
 external/mit/expat/dist/conftools/ax-check-compile-flag.m4                 |     74 +
 external/mit/expat/dist/conftools/ax-check-link-flag.m4                    |     53 +
 external/mit/expat/dist/conftools/ax-require-defined.m4                    |     37 +
 external/mit/expat/dist/conftools/compile                                  |    348 +
 external/mit/expat/dist/conftools/depcomp                                  |    791 +
 external/mit/expat/dist/conftools/expatcfg-compiler-supports-visibility.m4 |     39 +
 external/mit/expat/dist/conftools/get-version.sh                           |     19 +-
 external/mit/expat/dist/conftools/install-sh                               |     25 +-
 external/mit/expat/dist/conftools/ltmain.sh                                |     10 +
 external/mit/expat/dist/conftools/missing                                  |    215 +
 external/mit/expat/dist/conftools/test-driver                              |    148 +
 external/mit/expat/dist/doc/Makefile.am                                    |     59 +
 external/mit/expat/dist/doc/Makefile.in                                    |    596 +
 external/mit/expat/dist/doc/reference.html                                 |     24 +-
 external/mit/expat/dist/doc/xmlwf.1                                        |     13 +-
 external/mit/expat/dist/doc/xmlwf.xml                                      |     18 +-
 external/mit/expat/dist/examples/Makefile.am                               |     39 +
 external/mit/expat/dist/examples/Makefile.in                               |    655 +
 external/mit/expat/dist/examples/elements.c                                |     59 +-
 external/mit/expat/dist/examples/outline.c                                 |     86 +-
 external/mit/expat/dist/expat_config.h                                     |    133 +
 external/mit/expat/dist/expat_config.h.cmake                               |    206 +-
 external/mit/expat/dist/expat_config.h.in                                  |     43 +-
 external/mit/expat/dist/fix-xmltest-log.sh                                 |     48 +
 external/mit/expat/dist/lib/Makefile.am                                    |     75 +
 external/mit/expat/dist/lib/Makefile.in                                    |    803 +
 external/mit/expat/dist/lib/ascii.h                                        |     32 +-
 external/mit/expat/dist/lib/asciitab.h                                     |     94 +-
 external/mit/expat/dist/lib/expat.h                                        |    310 +-
 external/mit/expat/dist/lib/expat_external.h                               |    120 +-
 external/mit/expat/dist/lib/iasciitab.h                                    |     94 +-
 external/mit/expat/dist/lib/internal.h                                     |     76 +-
 external/mit/expat/dist/lib/latin1tab.h                                    |     94 +-
 external/mit/expat/dist/lib/libexpat.def                                   |      4 +-
 external/mit/expat/dist/lib/libexpatw.def                                  |      4 +-
 external/mit/expat/dist/lib/nametab.h                                      |    274 +-
 external/mit/expat/dist/lib/siphash.h                                      |    446 +-
 external/mit/expat/dist/lib/utf8tab.h                                      |     95 +-
 external/mit/expat/dist/lib/winconfig.h                                    |     58 +-
 external/mit/expat/dist/lib/xmlrole.c                                      |    809 +-
 external/mit/expat/dist/lib/xmlrole.h                                      |     45 +-
 external/mit/expat/dist/lib/xmltok_impl.h                                  |    103 +-
 external/mit/expat/dist/lib/xmltok_ns.c                                    |    117 +-
 external/mit/expat/dist/test-driver-wrapper.sh                             |     43 +
 external/mit/expat/dist/tests/Makefile.am                                  |     66 +
 external/mit/expat/dist/tests/Makefile.in                                  |   1249 +
 external/mit/expat/dist/tests/benchmark/Makefile.am                        |     40 +
 external/mit/expat/dist/tests/benchmark/Makefile.in                        |    646 +
 external/mit/expat/dist/tests/benchmark/benchmark.c                        |    131 +-
 external/mit/expat/dist/tests/chardata.c                                   |    173 +-
 external/mit/expat/dist/tests/chardata.h                                   |     54 +-
 external/mit/expat/dist/tests/memcheck.c                                   |    265 +-
 external/mit/expat/dist/tests/memcheck.h                                   |     41 +-
 external/mit/expat/dist/tests/minicheck.c                                  |    305 +-
 external/mit/expat/dist/tests/minicheck.h                                  |    107 +-
 external/mit/expat/dist/tests/runtests.c                                   |  13924 +++++++--
 external/mit/expat/dist/tests/runtestspp.cpp                               |     40 +-
 external/mit/expat/dist/tests/structdata.c                                 |    155 +
 external/mit/expat/dist/tests/structdata.h                                 |     70 +
 external/mit/expat/dist/tests/udiffer.py                                   |     62 +
 external/mit/expat/dist/tests/xmltest.log.expected                         |     10 +
 external/mit/expat/dist/win32/README.txt                                   |     43 +-
 external/mit/expat/dist/win32/build_expat_iss.bat                          |     84 +
 external/mit/expat/dist/win32/expat.iss                                    |     34 +-
 external/mit/expat/dist/xmlwf/Makefile.am                                  |     59 +
 external/mit/expat/dist/xmlwf/Makefile.in                                  |    776 +
 external/mit/expat/dist/xmlwf/codepage.c                                   |     80 +-
 external/mit/expat/dist/xmlwf/codepage.h                                   |     32 +-
 external/mit/expat/dist/xmlwf/ct.c                                         |     58 +-
 external/mit/expat/dist/xmlwf/filemap.h                                    |     44 +-
 external/mit/expat/dist/xmlwf/readfilemap.c                                |    108 +-
 external/mit/expat/dist/xmlwf/unixfilemap.c                                |     66 +-
 external/mit/expat/dist/xmlwf/win32filemap.c                               |     67 +-
 external/mit/expat/dist/xmlwf/xmlfile.c                                    |    163 +-
 external/mit/expat/dist/xmlwf/xmlfile.h                                    |     43 +-
 external/mit/expat/dist/xmlwf/xmlmime.c                                    |     74 +-
 external/mit/expat/dist/xmlwf/xmlmime.h                                    |     32 +
 external/mit/expat/dist/xmlwf/xmltchar.h                                   |    104 +-
 external/mit/expat/dist/xmlwf/xmlwf.c                                      |    693 +-
 external/mit/expat/dist/xmlwf/xmlwf_helpgen.py                             |     69 +
 external/mit/expat/dist/xmlwf/xmlwf_helpgen.sh                             |     35 +
 98 files changed, 29646 insertions(+), 7619 deletions(-)

diffs (truncated from 41523 to 300 lines):

diff -r 3bcda51c87d6 -r 1f21fc761724 external/mit/expat/dist/CMake.README
--- a/external/mit/expat/dist/CMake.README      Mon Sep 16 06:16:42 2019 +0000
+++ b/external/mit/expat/dist/CMake.README      Mon Sep 16 06:19:03 2019 +0000
@@ -1,42 +1,42 @@
-== How to build expat with cmake (experimental) ==
-
-The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual 
-Studio) and should work on all other platform cmake supports.
-
-Assuming ~/expat-2.2.1 is the source directory of expat, add a subdirectory
-build and change into that directory:
-~/expat-2.2.1$ mkdir build && cd build
-~/expat-2.2.1/build$
-
-From that directory, call cmake first, then call make, make test and 
-make install in the usual way:
-~/expat-2.2.1/build$ cmake ..
--- The C compiler identification is GNU
--- The CXX compiler identification is GNU
-....
--- Configuring done
--- Generating done
--- Build files have been written to: /home/patrick/expat-2.2.1/build
-
-If you want to specify the install location for your files, append 
--DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
-
-~/expat-2.2.1/build$ make && make test && make install
-Scanning dependencies of target expat
-[  5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
-[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
-....
--- Installing: /usr/local/lib/pkgconfig/expat.pc
--- Installing: /usr/local/bin/xmlwf
--- Installing: /usr/local/share/man/man1/xmlwf.1
-
-For Windows builds, you must make sure to call cmake from an environment where 
-your compiler is reachable, that means either you call it from the 
-Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
-make sure that gcc can be called. On Windows, you also might want to specify a 
-special Generator for CMake:
-for Visual Studio builds do: 
-cmake .. -G "Visual Studio 10" && vcexpress expat.sln
-for mingw builds do: 
-cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install 
-    && gmake && gmake install
+== How to build expat with cmake (experimental) ==
+
+The cmake based buildsystem for expat works on Windows (cygwin, mingw, Visual
+Studio) and should work on all other platform cmake supports.
+
+Assuming ~/expat-2.2.8 is the source directory of expat, add a subdirectory
+build and change into that directory:
+~/expat-2.2.8$ mkdir build && cd build
+~/expat-2.2.8/build$
+
+From that directory, call cmake first, then call make, make test and
+make install in the usual way:
+~/expat-2.2.8/build$ cmake ..
+-- The C compiler identification is GNU
+-- The CXX compiler identification is GNU
+....
+-- Configuring done
+-- Generating done
+-- Build files have been written to: /home/patrick/expat-2.2.8/build
+
+If you want to specify the install location for your files, append
+-DCMAKE_INSTALL_PREFIX=/your/install/path to the cmake call.
+
+~/expat-2.2.8/build$ make && make test && make install
+Scanning dependencies of target expat
+[  5%] Building C object CMakeFiles/expat.dir/lib/xmlparse.c.o
+[ 11%] Building C object CMakeFiles/expat.dir/lib/xmlrole.c.o
+....
+-- Installing: /usr/local/lib/pkgconfig/expat.pc
+-- Installing: /usr/local/bin/xmlwf
+-- Installing: /usr/local/share/man/man1/xmlwf.1
+
+For Windows builds, you must make sure to call cmake from an environment where
+your compiler is reachable, that means either you call it from the
+Visual Studio Command Prompt or when using mingw, you must open a cmd.exe and
+make sure that gcc can be called. On Windows, you also might want to specify a
+special Generator for CMake:
+for Visual Studio builds do:
+cmake .. -G "Visual Studio 15 2017" && msbuild /m expat.sln
+for mingw builds do:
+cmake .. -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=D:\expat-install
+    && gmake && gmake install
diff -r 3bcda51c87d6 -r 1f21fc761724 external/mit/expat/dist/CMakeLists.txt
--- a/external/mit/expat/dist/CMakeLists.txt    Mon Sep 16 06:16:42 2019 +0000
+++ b/external/mit/expat/dist/CMakeLists.txt    Mon Sep 16 06:19:03 2019 +0000
@@ -1,153 +1,583 @@
-# This file is copyrighted under the BSD-license for buildsystem files of KDE
-# copyright 2010, Patrick Spendrin <ps_ml%gmx.de@localhost>
-
-project(expat)
-
-cmake_minimum_required(VERSION 2.6)
-set(PACKAGE_BUGREPORT "expat-bugs%libexpat.org@localhost")
-set(PACKAGE_NAME "expat")
-set(PACKAGE_VERSION "2.2.1")
-set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
-set(PACKAGE_TARNAME "${PACKAGE_NAME}")
-
-option(BUILD_tools "build the xmlwf tool for expat library" ON)
-option(BUILD_examples "build the examples for expat library" ON)
-option(BUILD_tests "build the tests for expat library" ON)
-option(BUILD_shared "build a shared expat library" ON)
-option(BUILD_doc "build man page for xmlwf" ON)
-option(INSTALL "install expat files in cmake install target" ON)
-
-# configuration options
-set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
-option(XML_DTD "Define to make parameter entity parsing functionality available" ON)
-option(XML_NS "Define to make XML Namespaces functionality available" ON)
-
-if(XML_DTD)
-    set(XML_DTD 1)
-else(XML_DTD)
-    set(XML_DTD 0)
-endif(XML_DTD)
-if(XML_NS)
-    set(XML_NS 1)
-else(XML_NS)
-    set(XML_NS 0)
-endif(XML_NS)
-
-if(BUILD_tests)
-    enable_testing()
-endif(BUILD_tests)
-
-include(ConfigureChecks.cmake)
-
-set(EXTRA_LINK_AND_COMPILE_FLAGS "-fno-strict-aliasing")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}")
-
-include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)
-if(MSVC)
-    add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
-endif(MSVC)
-if(WIN32)
-    set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Add a suffix, usually d on Windows")
-endif(WIN32)
-
-set(expat_SRCS
-    lib/xmlparse.c
-    lib/xmlrole.c
-    lib/xmltok.c
-    lib/xmltok_impl.c
-    lib/xmltok_ns.c
-)
-
-if(BUILD_shared)
-    set(_SHARED SHARED)
-    if(WIN32)
-        set(expat_SRCS ${expat_SRCS} lib/libexpat.def)
-    endif(WIN32)
-else(BUILD_shared)
-    set(_SHARED STATIC)
-    if(WIN32)
-        add_definitions(-DXML_STATIC)
-    endif(WIN32)
-endif(BUILD_shared)
-
-add_library(expat ${_SHARED} ${expat_SRCS})
-
-set(LIBCURRENT 7)   # sync
-set(LIBREVISION 3)  # with
-set(LIBAGE 6)       # configure.ac!
-math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}")
-
-if(NOT WIN32)
-    set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION})
-    set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE})
-    set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME})
-endif(NOT WIN32)
-
-macro(expat_install)
-    if(INSTALL)
-        install(${ARGN})
-    endif()
-endmacro()
-
-expat_install(TARGETS expat RUNTIME DESTINATION bin
-                      LIBRARY DESTINATION lib
-                      ARCHIVE DESTINATION lib)
-
-set(prefix ${CMAKE_INSTALL_PREFIX})
-set(exec_prefix "\${prefix}/bin")
-set(libdir "\${prefix}/lib")
-set(includedir "\${prefix}/include")
-configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc)
-
-expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION include)
-expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig)
-
-if(BUILD_tools AND NOT WINCE)
-    set(xmlwf_SRCS
-        xmlwf/xmlwf.c
-        xmlwf/xmlfile.c
-        xmlwf/codepage.c
-        xmlwf/readfilemap.c
-    )
-
-    add_executable(xmlwf ${xmlwf_SRCS})
-    set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf)
-    target_link_libraries(xmlwf expat)
-    expat_install(TARGETS xmlwf DESTINATION bin)
-    if(BUILD_doc AND NOT MSVC)
-        if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
-            set(make_command "$(MAKE)")
-        else()
-            set(make_command "make")
-        endif()
-
-        add_custom_command(TARGET expat PRE_BUILD COMMAND "${make_command}" -C "${PROJECT_SOURCE_DIR}/doc" xmlwf.1)
-        expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION share/man/man1)
-    endif()
-endif(BUILD_tools AND NOT WINCE)
-
-if(BUILD_examples)
-    add_executable(elements examples/elements.c)
-    set_property(TARGET elements PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
-    target_link_libraries(elements expat)
-
-    add_executable(outline examples/outline.c)
-    set_property(TARGET outline PROPERTY RUNTIME_OUTPUT_DIRECTORY examples)
-    target_link_libraries(outline expat)
-endif(BUILD_examples)
-
-if(BUILD_tests)
-    ## these are unittests that can be run on any platform
-    add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c tests/memcheck.c)
-    set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
-    target_link_libraries(runtests expat)
-    add_test(runtests tests/runtests)
-
-    add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c tests/memcheck.c)
-    set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests)
-    target_link_libraries(runtestspp expat)
-    add_test(runtestspp tests/runtestspp)
-endif(BUILD_tests)
+# This file is copyrighted under the BSD-license for buildsystem files of KDE
+# copyright 2010, Patrick Spendrin <ps_ml%gmx.de@localhost>
+
+cmake_minimum_required(VERSION 3.1.3)
+
+project(expat
+    VERSION
+        2.2.8
+    LANGUAGES
+        C
+)
+
+set(PACKAGE_BUGREPORT "expat-bugs%libexpat.org@localhost")
+set(PACKAGE_NAME "expat")
+set(PACKAGE_VERSION "${PROJECT_VERSION}")
+set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+set(PACKAGE_TARNAME "${PACKAGE_NAME}")
+
+include(CMakePackageConfigHelpers)
+include(GNUInstallDirs)
+
+#
+# Configuration defaults
+#
+if(WINCE)
+    set(_EXPAT_BUILD_TOOLS_DEFAULT OFF)
+else()
+    set(_EXPAT_BUILD_TOOLS_DEFAULT ON)
+endif()
+if(MSVC OR NOT _EXPAT_BUILD_TOOLS_DEFAULT)
+    set(_EXPAT_BUILD_DOCS_DEFAULT OFF)
+else()
+    find_program(DOCBOOK_TO_MAN NAMES docbook2x-man db2x_docbook2man docbook2man docbook-to-man)
+    if(DOCBOOK_TO_MAN)
+        set(_EXPAT_BUILD_DOCS_DEFAULT ON)
+    else()
+        set(_EXPAT_BUILD_DOCS_DEFAULT OFF)
+    endif()
+endif()
+
+#
+# Configuration
+#
+option(EXPAT_BUILD_TOOLS "build the xmlwf tool for expat library" ${_EXPAT_BUILD_TOOLS_DEFAULT})
+option(EXPAT_BUILD_EXAMPLES "build the examples for expat library" ON)
+option(EXPAT_BUILD_TESTS "build the tests for expat library" ON)
+option(EXPAT_SHARED_LIBS "build a shared expat library" ON)
+option(EXPAT_BUILD_DOCS "build man page for xmlwf" ${_EXPAT_BUILD_DOCS_DEFAULT})
+option(EXPAT_BUILD_FUZZERS "build fuzzers for the expat library" OFF)
+option(EXPAT_WITH_LIBBSD "utilize libbsd (for arc4random_buf)" OFF)
+option(EXPAT_ENABLE_INSTALL "install expat files in cmake install target" ON)
+set(EXPAT_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
+mark_as_advanced(EXPAT_CONTEXT_BYTES)
+option(EXPAT_DTD "Define to make parameter entity parsing functionality available" ON)
+mark_as_advanced(EXPAT_DTD)



Home | Main Index | Thread Index | Old Index