aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/AddSphinxTarget.cmake
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-12-04 19:51:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-04 19:51:48 +0000
commita21bbdfad461e957fa42ac9d6860ddc9de2da3e9 (patch)
tree8d32ff2094b47e15a8def30d62fd7dee6e009de3 /cmake/modules/AddSphinxTarget.cmake
parent6b8c6a5088c221af2b25065b8b6b8b0fec8a116f (diff)
parent876d6995443e99d13696f3941c3a789a4daa7c7a (diff)
downloadexternal_llvm-a21bbdfad461e957fa42ac9d6860ddc9de2da3e9.zip
external_llvm-a21bbdfad461e957fa42ac9d6860ddc9de2da3e9.tar.gz
external_llvm-a21bbdfad461e957fa42ac9d6860ddc9de2da3e9.tar.bz2
am 876d6995: Merge "Update aosp/master LLVM for rebase to r222494."
* commit '876d6995443e99d13696f3941c3a789a4daa7c7a': Update aosp/master LLVM for rebase to r222494.
Diffstat (limited to 'cmake/modules/AddSphinxTarget.cmake')
-rw-r--r--cmake/modules/AddSphinxTarget.cmake11
1 files changed, 9 insertions, 2 deletions
diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
index fc28a49..045dc23 100644
--- a/cmake/modules/AddSphinxTarget.cmake
+++ b/cmake/modules/AddSphinxTarget.cmake
@@ -8,16 +8,23 @@ function (add_sphinx_target builder project)
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
- "Generating ${builder} Sphinx documentation for ${project}")
+ "Generating ${builder} Sphinx documentation for ${project} into \"${SPHINX_BUILD_DIR}\"")
# When "clean" target is run, remove the Sphinx build directory
set_property(DIRECTORY APPEND PROPERTY