summaryrefslogtreecommitdiff
path: root/cmake/config-ix.cmake
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-04-18 21:45:25 +0000
committerReid Kleckner <reid@kleckner.net>2014-04-18 21:45:25 +0000
commit4c464def6ae721b09ebb7cf202e04339267f761a (patch)
tree308d3874daef7fd9dfe4ba3569bf3c2047d07ade /cmake/config-ix.cmake
parent08ef0202ce1b2324cccafba3d640cc8a9b859dd0 (diff)
downloadllvm-4c464def6ae721b09ebb7cf202e04339267f761a.tar.gz
llvm-4c464def6ae721b09ebb7cf202e04339267f761a.tar.bz2
llvm-4c464def6ae721b09ebb7cf202e04339267f761a.tar.xz
Added Sphinx documentation generation to CMake build system.
The option LLVM_ENABLE_SPHINX option enables the "docs-llvm-html", "docs-llvm-man" targets but does not build them by default. The following CMake options have been added that control what targets are made available SPHINX_OUTPUT_HTML SPHINX_OUTPUT_MAN If LLVM_BUILD_DOCS is enabled then the enabled docs-llvm-* targets will be built by default and if ``make install`` is run then docs-llvm-html and docs-llvm-man will be installed (tested on Linux only). The add_sphinx_target function is in its own file so it can be included by other projects that use Sphinx for their documentation. Patch by Daniel Liew <daniel.liew@imperial.ac.uk>! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206655 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/config-ix.cmake')
-rwxr-xr-xcmake/config-ix.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 197caf9355..d1e4b2a64e 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -505,3 +505,13 @@ if (LLVM_ENABLE_DOXYGEN)
else()
message(STATUS "Doxygen disabled.")
endif()
+
+if (LLVM_ENABLE_SPHINX)
+ message(STATUS "Sphinx enabled.")
+ find_package(Sphinx REQUIRED)
+ if (LLVM_BUILD_DOCS)
+ add_custom_target(sphinx ALL)
+ endif()
+else()
+ message(STATUS "Sphinx disabled.")
+endif()