Skip to content

Commit

Permalink
Revert "Revert "CMake: Move sphinx detection into AddSphinxTarget.cma…
Browse files Browse the repository at this point in the history
…ke""

This reverts commit r302054.

Re-commit now that I have fixes for clang/lld.

llvm-svn: 302499
  • Loading branch information
tstellar committed May 9, 2017
1 parent b068087 commit ea139ec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
10 changes: 0 additions & 10 deletions llvm/cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
13 changes: 13 additions & 0 deletions llvm/cmake/modules/AddSphinxTarget.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion llvm/docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ea139ec

Please sign in to comment.