summaryrefslogtreecommitdiffstats
path: root/Utilities/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-06-22 13:39:02 (GMT)
committerBrad King <brad.king@kitware.com>2010-06-22 13:39:02 (GMT)
commit8c0e79f8240067918891cd9f406b3ff0ee721d79 (patch)
tree544e738b0bfcb2f03284487e386bc8e00c3e9367 /Utilities/CMakeLists.txt
parentd7770578d124bad230690f5c5963ee5517279acc (diff)
downloadCMake-8c0e79f8240067918891cd9f406b3ff0ee721d79.zip
CMake-8c0e79f8240067918891cd9f406b3ff0ee721d79.tar.gz
CMake-8c0e79f8240067918891cd9f406b3ff0ee721d79.tar.bz2
Run CMake.HTML test without net access (#10857)
Use xmllint's --nonet option to avoid downloading the xhtml DTD. Provide the DTD and its dependencies locally.
Diffstat (limited to 'Utilities/CMakeLists.txt')
-rw-r--r--Utilities/CMakeLists.txt10
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()