summaryrefslogtreecommitdiffstats
path: root/cmake/modules/AddSphinxTarget.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/AddSphinxTarget.cmake')
-rw-r--r--cmake/modules/AddSphinxTarget.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
index cfc7f38e9e77..c3a676d3063d 100644
--- a/cmake/modules/AddSphinxTarget.cmake
+++ b/cmake/modules/AddSphinxTarget.cmake
@@ -1,3 +1,16 @@
+
+# Create sphinx target
+if (LLVM_ENABLE_SPHINX AND NOT TARGET 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()
+
+
# Handy function for creating the different Sphinx targets.
#
# ``builder`` should be one of the supported builders used by