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


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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to