[llvm] r215634 - Add SPHINX_WARNINGS_AS_ERRORS CMake option to allow warnings to not be
Sean Silva
chisophugis at gmail.com
Thu Aug 14 13:40:26 PDT 2014
On Thu, Aug 14, 2014 at 4:57 AM, Dan Liew <dan at su-root.co.uk> wrote:
> Author: delcypher
> Date: Thu Aug 14 06:57:13 2014
> New Revision: 215634
>
> URL: http://llvm.org/viewvc/llvm-project?rev=215634&view=rev
> Log:
> Add SPHINX_WARNINGS_AS_ERRORS CMake option to allow warnings to not be
> treated as errors (which is still the default).
This seems to contradict the patch, which seems to make -W the default
(SPHINX_WARNINGS_AS_ERRORS=ON by default).
-- Sean Silva
> This is useful when
> working on documentation that has existing errors.
>
> Modified:
> llvm/trunk/cmake/modules/AddSphinxTarget.cmake
> llvm/trunk/cmake/modules/FindSphinx.cmake
> llvm/trunk/docs/CMake.rst
>
> Modified: llvm/trunk/cmake/modules/AddSphinxTarget.cmake
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddSphinxTarget.cmake?rev=215634&r1=215633&r2=215634&view=diff
>
> ==============================================================================
> --- llvm/trunk/cmake/modules/AddSphinxTarget.cmake (original)
> +++ llvm/trunk/cmake/modules/AddSphinxTarget.cmake Thu Aug 14 06:57:13 2014
> @@ -8,12 +8,19 @@ function (add_sphinx_target builder proj
> set(SPHINX_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/${builder}")
> set(SPHINX_DOC_TREE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
> set(SPHINX_TARGET_NAME docs-${project}-${builder})
> +
> + if (SPHINX_WARNINGS_AS_ERRORS)
> + set(SPHINX_WARNINGS_AS_ERRORS_FLAG "-W")
> + else()
> + set(SPHINX_WARNINGS_AS_ERRORS_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.
> - -W # Warnings are errors.
> + ${SPHINX_WARNINGS_AS_ERRORS_FLAG} # Treat
> warnings as errors if requested
> "${CMAKE_CURRENT_SOURCE_DIR}" # Source
> "${SPHINX_BUILD_DIR}" # Output
> COMMENT
>
> Modified: llvm/trunk/cmake/modules/FindSphinx.cmake
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/FindSphinx.cmake?rev=215634&r1=215633&r2=215634&view=diff
>
> ==============================================================================
> --- llvm/trunk/cmake/modules/FindSphinx.cmake (original)
> +++ llvm/trunk/cmake/modules/FindSphinx.cmake Thu Aug 14 06:57:13 2014
> @@ -23,3 +23,5 @@ find_package_handle_standard_args(Sphinx
> # Provide options for controlling different types of output
> option(SPHINX_OUTPUT_HTML "Output standalone HTML files" ON)
> option(SPHINX_OUTPUT_MAN "Output man pages" ON)
> +
> +option(SPHINX_WARNINGS_AS_ERRORS "When building documentation treat
> warnings as errors" ON)
>
> Modified: llvm/trunk/docs/CMake.rst
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMake.rst?rev=215634&r1=215633&r2=215634&view=diff
>
> ==============================================================================
> --- llvm/trunk/docs/CMake.rst (original)
> +++ llvm/trunk/docs/CMake.rst Thu Aug 14 06:57:13 2014
> @@ -363,6 +363,10 @@ LLVM-specific variables
> is enabled). Currently the only target added is ``docs-llvm-man``.
> Defaults
> to ON.
>
> +**SPHINX_WARNINGS_AS_ERRORS**:BOOL
> + If enabled then sphinx documentation warnings will be treated as
> + errors. Defaults to ON.
> +
> Executing the test suite
> ========================
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140814/142c1e03/attachment.html>
More information about the llvm-commits
mailing list