diff options
Diffstat (limited to 'Utilities/CMakeLists.txt')
-rw-r--r-- | Utilities/CMakeLists.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index ecae7b0..4aa8719 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -138,8 +138,16 @@ if(BUILD_TESTING) endif() mark_as_advanced(LIBXML2_XMLLINT_EXECUTABLE) if(LIBXML2_XMLLINT_EXECUTABLE) + # We provide the XHTML DTD and its dependencies in the 'xml' + # directory so that xmllint can run without network access. + # However, it's --path option accepts a space-separated list of + # paths so it cannot handle spaces in the path to the source tree. + # Therefore we run the tool with the current work directory set to + # the 'xml' directory and use '.' as the path. add_test(CMake.HTML - ${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout ${HTML_FILES} + ${CMAKE_CMAKE_COMMAND} -E chdir ${CMAKE_CURRENT_SOURCE_DIR}/xml + ${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout --nonet --path . + ${HTML_FILES} ) endif() endif() |