[libxml2] Add variable for working directory of XML Conformance Test Suite



commit 8bec210d4d16c24817b1ad7303a2bda0e1a2289f
Author: Markus Rickert <rickert fortiss org>
Date:   Thu Jun 4 17:37:21 2020 +0200

    Add variable for working directory of XML Conformance Test Suite

 CMakeLists.txt | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63097924..d7d86e86 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,6 +104,8 @@ else()
        set(LIBXML2_WITH_ZLIB OFF)
 endif()
 
+set(LIBXML2_XMLCONF_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Working directory for XML 
Conformance Test Suite")
+
 foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_DOCB WITH_EXPR WITH_FTP 
WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MEM_DEBUG WITH_MODULES 
WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_RUN_DEBUG WITH_SAX1 WITH_SCHEMAS 
WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_TREE WITH_TRIO WITH_UNICODE WITH_VALID WITH_WRITER 
WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_ZLIB)
        if(LIBXML2_${VARIABLE})
                set(${VARIABLE} 1)
@@ -559,8 +561,11 @@ if(LIBXML2_WITH_TESTS)
                add_executable(${TEST} ${TEST}.c)
                target_link_libraries(${TEST} LibXml2)
        endforeach()
-       if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/xmlconf/xmlconf.xml)
-               add_test(NAME runxmlconf COMMAND runxmlconf)
+       if(EXISTS ${LIBXML2_XMLCONF_WORKING_DIR}/xmlconf/xmlconf.xml)
+               add_test(NAME runxmlconf COMMAND runxmlconf WORKING_DIRECTORY ${LIBXML2_XMLCONF_WORKING_DIR})
+       endif()
+       if(NOT WIN32)
+               add_test(NAME testapi COMMAND testapi)
        endif()
        add_test(NAME testchar COMMAND testchar)
        add_test(NAME testdict COMMAND testdict)
@@ -587,6 +592,8 @@ if(LIBXML2_WITH_PYTHON)
                ${CMAKE_CURRENT_SOURCE_DIR}/python/generator.py
                ${CMAKE_CURRENT_SOURCE_DIR}/doc/libxml2-api.xml
                ${CMAKE_CURRENT_SOURCE_DIR}/python/libxml2-python-api.xml
+               WORKING_DIRECTORY
+               ${CMAKE_CURRENT_BINARY_DIR}
        )
        file(READ python/libxml.py LIBXML_PY)
        file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/libxml2.py.in "${LIBXML_PY}")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]