diff options
author | Brad King <brad.king@kitware.com> | 2010-03-01 13:47:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-03-01 13:51:22 (GMT) |
commit | 370e5b942513abd93cbd2d486a0627ccb47267af (patch) | |
tree | ebb1e0000d253511bc6a908df8ea8a0d0ee308b7 /Utilities | |
parent | 5771dd2f15f871eb44b31fa84d67fa587654b770 (diff) | |
download | CMake-370e5b942513abd93cbd2d486a0627ccb47267af.zip CMake-370e5b942513abd93cbd2d486a0627ccb47267af.tar.gz CMake-370e5b942513abd93cbd2d486a0627ccb47267af.tar.bz2 |
Documentation: Test XHTML compliance
Use xmllint to validate our generated HTML documentation.
See issue #10338.
Diffstat (limited to 'Utilities')
-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 24f735b..ecae7b0 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() |