[PATCH] D31773: CMake: Move sphinx detection into AddSphinxTarget.cmake
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 07:43:10 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL302025: CMake: Move sphinx detection into AddSphinxTarget.cmake (authored by tstellar).
Changed prior to commit:
https://reviews.llvm.org/D31773?vs=94392&id=97643#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31773
Files:
llvm/trunk/cmake/config-ix.cmake
llvm/trunk/cmake/modules/AddSphinxTarget.cmake
llvm/trunk/docs/CMakeLists.txt
Index: llvm/trunk/cmake/config-ix.cmake
===================================================================
--- llvm/trunk/cmake/config-ix.cmake
+++ llvm/trunk/cmake/config-ix.cmake
@@ -530,16 +530,6 @@
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()
-
set(LLVM_BINDINGS "")
if(WIN32)
message(STATUS "Go bindings disabled.")
Index: llvm/trunk/cmake/modules/AddSphinxTarget.cmake
===================================================================
--- llvm/trunk/cmake/modules/AddSphinxTarget.cmake
+++ llvm/trunk/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
Index: llvm/trunk/docs/CMakeLists.txt
===================================================================
--- llvm/trunk/docs/CMakeLists.txt
+++ llvm/trunk/docs/CMakeLists.txt
@@ -103,8 +103,8 @@
endif()
if (LLVM_ENABLE_SPHINX)
+ include(AddSphinxTarget)
if (SPHINX_FOUND)
- include(AddSphinxTarget)
if (${SPHINX_OUTPUT_HTML})
add_sphinx_target(html llvm)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31773.97643.patch
Type: text/x-patch
Size: 1584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170503/d7e55831/attachment.bin>
More information about the llvm-commits
mailing list