docbook: Add CMake.DocBook test to validate xml (#13508)
The DocBook DTD is provided in "Utilities/xml/docbook-4.5".
This commit is contained in:
parent
3a9e373a69
commit
9468b41daf
|
@ -27,7 +27,6 @@ set(MAN_FILES
|
||||||
)
|
)
|
||||||
set(TEXT_FILES
|
set(TEXT_FILES
|
||||||
${CMake_BINARY_DIR}/Docs/cmake.txt
|
${CMake_BINARY_DIR}/Docs/cmake.txt
|
||||||
${CMake_BINARY_DIR}/Docs/cmake.docbook
|
|
||||||
${CMake_BINARY_DIR}/Docs/cmake-policies.txt
|
${CMake_BINARY_DIR}/Docs/cmake-policies.txt
|
||||||
${CMake_BINARY_DIR}/Docs/cmake-properties.txt
|
${CMake_BINARY_DIR}/Docs/cmake-properties.txt
|
||||||
${CMake_BINARY_DIR}/Docs/cmake-variables.txt
|
${CMake_BINARY_DIR}/Docs/cmake-variables.txt
|
||||||
|
@ -44,6 +43,9 @@ set(HTML_FILES
|
||||||
${CMake_BINARY_DIR}/Docs/cmake-commands.html
|
${CMake_BINARY_DIR}/Docs/cmake-commands.html
|
||||||
${CMake_BINARY_DIR}/Docs/cmake-compatcommands.html
|
${CMake_BINARY_DIR}/Docs/cmake-compatcommands.html
|
||||||
)
|
)
|
||||||
|
set(DOCBOOK_FILES
|
||||||
|
${CMake_BINARY_DIR}/Docs/cmake.docbook
|
||||||
|
)
|
||||||
|
|
||||||
macro(ADD_DOCS target dependency)
|
macro(ADD_DOCS target dependency)
|
||||||
# Generate documentation for "ctest" executable.
|
# Generate documentation for "ctest" executable.
|
||||||
|
@ -63,11 +65,9 @@ macro(ADD_DOCS target dependency)
|
||||||
)
|
)
|
||||||
set(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/${target}.txt)
|
set(DOC_FILES ${DOC_FILES} ${CMake_BINARY_DIR}/Docs/${target}.txt)
|
||||||
list(APPEND MAN_FILES ${CMake_BINARY_DIR}/Docs/${target}.1)
|
list(APPEND MAN_FILES ${CMake_BINARY_DIR}/Docs/${target}.1)
|
||||||
list(APPEND TEXT_FILES
|
list(APPEND TEXT_FILES ${CMake_BINARY_DIR}/Docs/${target}.txt)
|
||||||
${CMake_BINARY_DIR}/Docs/${target}.txt
|
|
||||||
${CMake_BINARY_DIR}/Docs/${target}.docbook
|
|
||||||
)
|
|
||||||
list(APPEND HTML_FILES ${CMake_BINARY_DIR}/Docs/${target}.html)
|
list(APPEND HTML_FILES ${CMake_BINARY_DIR}/Docs/${target}.html)
|
||||||
|
list(APPEND DOCBOOK_FILES ${CMake_BINARY_DIR}/Docs/${target}.docbook)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
@ -124,7 +124,11 @@ add_custom_command(
|
||||||
)
|
)
|
||||||
|
|
||||||
install_files(${CMAKE_MAN_DIR}/man1 FILES ${MAN_FILES})
|
install_files(${CMAKE_MAN_DIR}/man1 FILES ${MAN_FILES})
|
||||||
install_files(${CMAKE_DOC_DIR} FILES ${HTML_FILES} ${TEXT_FILES})
|
install_files(${CMAKE_DOC_DIR} FILES
|
||||||
|
${TEXT_FILES}
|
||||||
|
${HTML_FILES}
|
||||||
|
${DOCBOOK_FILES}
|
||||||
|
)
|
||||||
install(FILES cmake.m4 DESTINATION share/aclocal)
|
install(FILES cmake.m4 DESTINATION share/aclocal)
|
||||||
|
|
||||||
# Drive documentation generation.
|
# Drive documentation generation.
|
||||||
|
@ -152,6 +156,11 @@ if(BUILD_TESTING)
|
||||||
--path ${_dtd_dir}/xhtml1
|
--path ${_dtd_dir}/xhtml1
|
||||||
${HTML_FILES}
|
${HTML_FILES}
|
||||||
)
|
)
|
||||||
|
add_test(CMake.DocBook
|
||||||
|
${LIBXML2_XMLLINT_EXECUTABLE} --valid --noout --nonet
|
||||||
|
--path ${_dtd_dir}/docbook-4.5
|
||||||
|
${DOCBOOK_FILES}
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue