Documentation: Test XHTML compliance

Use xmllint to validate our generated HTML documentation.
See issue #10338.
This commit is contained in:
Brad King 2010-03-01 08:47:48 -05:00
parent 5771dd2f15
commit 370e5b9425
1 changed files with 14 additions and 0 deletions

View File

@ -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()