summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/AddSphinxTarget.cmake
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2017-05-09 01:41:28 +0000
committerTom Stellard <tstellar@redhat.com>2017-05-09 01:41:28 +0000
commitea139eccc1770a626b71fdd278d368bb49b6734c (patch)
treec749db38cb2cb0751b9afbe26d989b7b2a7d00aa /llvm/cmake/modules/AddSphinxTarget.cmake
parentb068087bd8fe568f9d18abd3186b051013cc259b (diff)
downloadbcm5719-llvm-ea139eccc1770a626b71fdd278d368bb49b6734c.tar.gz
bcm5719-llvm-ea139eccc1770a626b71fdd278d368bb49b6734c.zip
Revert "Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake""
This reverts commit r302054. Re-commit now that I have fixes for clang/lld. llvm-svn: 302499
Diffstat (limited to 'llvm/cmake/modules/AddSphinxTarget.cmake')
-rw-r--r--llvm/cmake/modules/AddSphinxTarget.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/cmake/modules/AddSphinxTarget.cmake b/llvm/cmake/modules/AddSphinxTarget.cmake
index cfc7f38e9e7..c3a676d3063 100644
--- a/llvm/cmake/modules/AddSphinxTarget.cmake
+++ b/llvm/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
OpenPOWER on IntegriCloud