[llvm] r302025 - CMake: Move sphinx detection into AddSphinxTarget.cmake
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 07:29:57 PDT 2017
Author: tstellar
Date: Wed May 3 09:29:56 2017
New Revision: 302025
URL: http://llvm.org/viewvc/llvm-project?rev=302025&view=rev
Log:
CMake: Move sphinx detection into AddSphinxTarget.cmake
Reviewers: chandlerc, beanz, mgorny
Reviewed By: beanz
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31773
Modified:
llvm/trunk/cmake/config-ix.cmake
llvm/trunk/cmake/modules/AddSphinxTarget.cmake
llvm/trunk/docs/CMakeLists.txt
Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=302025&r1=302024&r2=302025&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Wed May 3 09:29:56 2017
@@ -530,16 +530,6 @@ 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()
-
set(LLVM_BINDINGS "")
if(WIN32)
message(STATUS "Go bindings disabled.")
Modified: llvm/trunk/cmake/modules/AddSphinxTarget.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddSphinxTarget.cmake?rev=302025&r1=302024&r2=302025&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddSphinxTarget.cmake (original)
+++ llvm/trunk/cmake/modules/AddSphinxTarget.cmake Wed May 3 09:29:56 2017
@@ -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
Modified: llvm/trunk/docs/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMakeLists.txt?rev=302025&r1=302024&r2=302025&view=diff
==============================================================================
--- llvm/trunk/docs/CMakeLists.txt (original)
+++ llvm/trunk/docs/CMakeLists.txt Wed May 3 09:29:56 2017
@@ -103,8 +103,8 @@ endif()
endif()
if (LLVM_ENABLE_SPHINX)
+ include(AddSphinxTarget)
if (SPHINX_FOUND)
- include(AddSphinxTarget)
if (${SPHINX_OUTPUT_HTML})
add_sphinx_target(html llvm)
endif()
More information about the llvm-commits
mailing list