diff options
author | Brad King <brad.king@kitware.com> | 2010-03-01 08:47:48 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-03-01 08:51:22 -0500 |
commit | 370e5b942513abd93cbd2d486a0627ccb47267af (patch) | |
tree | ebb1e0000d253511bc6a908df8ea8a0d0ee308b7 /Utilities/CMakeLists.txt | |
parent | 5771dd2f15f871eb44b31fa84d67fa587654b770 (diff) | |
download | cmake-370e5b942513abd93cbd2d486a0627ccb47267af.tar.gz |
Documentation: Test XHTML compliance
Use xmllint to validate our generated HTML documentation.
See issue #10338.
Diffstat (limited to 'Utilities/CMakeLists.txt')
-rw-r--r-- | Utilities/CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt index 24f735b733..ecae7b0c9c 100644 --- a/Utilities/CMakeLists.txt +++ b/Utilities/CMakeLists.txt @@ -129,3 +129,17 @@ INSTALL_FILES(${CMAKE_DOC_DIR} FILES ${HTML_FILES} ${TEXT_FILES}) # Drive documentation generation. ADD_CUSTOM_TARGET(documentation ALL DEPENDS ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/cmake.txt ) + +# Documentation testing. +if(BUILD_TESTING) + find_package(LibXml2 QUIET) + if(NOT DEFINED LIBXML2_XMLLINT_EXECUTABLE) + find_program(LIBXML2_XMLLINT_EXECUTABLE xmllint) + endif() + mark_as_advanced(LIBXML2_XMLLINT_EXECUTABLE) + if(LIBXML2_XMLLINT_EXECUTABLE) + add_test(CMake.HTML + ${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout ${HTML_FILES} + ) + endif() +endif() |