[PATCH] D24646: [CMake] Allow building Sphinx docs in nit-picky mode

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 15 21:12:00 PDT 2016


EricWF created this revision.
EricWF added reviewers: rnk, delcypher.
EricWF added subscribers: llvm-commits, cfe-commits.
Herald added subscribers: mgorny, beanz.

The actual logic to build http://llvm.org/libcxx/docs does so with "-W" and "-n" enabled, meaning that the website will not be updated if there are any missing references.
Currently there is no way to emulate this behavior in CMake. 

This patch adds an option to enable Sphinx's nit-picky mode so that the libc++ Sphinx buildbot can test with this option enabled.

https://reviews.llvm.org/D24646

Files:
  cmake/modules/AddSphinxTarget.cmake

Index: cmake/modules/AddSphinxTarget.cmake
===================================================================
--- cmake/modules/AddSphinxTarget.cmake
+++ cmake/modules/AddSphinxTarget.cmake
@@ -14,13 +14,19 @@
   else()
     set(SPHINX_WARNINGS_AS_ERRORS_FLAG "")
   endif()
+  if (SPHINX_WARN_MISSING_REFERENCES)
+    set(SPHINX_WARN_MISSING_REFERENCES_FLAG "-n")
+  else()
+    set(SPHINX_WARN_MISSING_REFERENCES_FLAG "")
+  endif()
 
   add_custom_target(${SPHINX_TARGET_NAME}
                     COMMAND ${SPHINX_EXECUTABLE}
                             -b ${builder}
                             -d "${SPHINX_DOC_TREE_DIR}"
                             -q # Quiet: no output other than errors and warnings.
                             ${SPHINX_WARNINGS_AS_ERRORS_FLAG} # Treat warnings as errors if requested
+			    ${SPHINX_WARN_MISSING_REFERENCES_FLAG} # Treat missing references as warnings
                             "${CMAKE_CURRENT_SOURCE_DIR}" # Source
                             "${SPHINX_BUILD_DIR}" # Output
                     COMMENT


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24646.71593.patch
Type: text/x-patch
Size: 1060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160916/7fddcc29/attachment-0001.bin>


More information about the cfe-commits mailing list