summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2019-03-04 13:18:22 +0200
committerAnder Conselvan de Oliveira <ander.deoliveira@mapbox.com>2019-03-13 15:06:56 +0200
commit8afb24b539951a6b02cf9e6e41639fea1748deda (patch)
treead8aa7eeec7c73b75021d5bdbe92c29948ff1239 /cmake
parent7d1911572000d1353c1c0109402431323fcd8639 (diff)
downloadqtlocation-mapboxgl-8afb24b539951a6b02cf9e6e41639fea1748deda.tar.gz
[build] A build target to check for doxygen documentation coverage
Add a cmake target that builds doxygen documentation and reports on coverage using doxy-coverage. Script was copied from: https://github.com/alobbs/doxy-coverage/commit/29a0bbf43bfecb6872cdca0e4a11733954d25196
Diffstat (limited to 'cmake')
-rw-r--r--cmake/doxygen.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/doxygen.cmake b/cmake/doxygen.cmake
new file mode 100644
index 0000000000..c7e2fab3c4
--- /dev/null
+++ b/cmake/doxygen.cmake
@@ -0,0 +1,18 @@
+find_package(Doxygen)
+if(DOXYGEN_FOUND)
+ set(DOXYGEN_PROJECT_NAME "Mapbox GL Native")
+ set(DOXYGEN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/docs")
+ set(DOXYGEN_GENERATE_XML TRUE)
+ set(DOXYGEN_QUIET YES)
+ set(DOXYGEN_WARN_LOGFILE ${CMAKE_BINARY_DIR}/doxygen_warn.log)
+
+ doxygen_add_docs(generate_xml_doxygen
+ ${CMAKE_SOURCE_DIR}/include
+ )
+
+ add_custom_target(doxygen_coverage
+ COMMAND ${CMAKE_SOURCE_DIR}/scripts/doxy-coverage.py --noerror "${CMAKE_BINARY_DIR}/docs/xml"
+ COMMENT "Checking documentation coverage"
+ DEPENDS generate_xml_doxygen
+ )
+endif()