From e15d6e93f575053ab5d71f96dd2f607da32b723e Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 3 May 2017 17:22:23 +0000 Subject: [PATCH] Revert "CMake: Move sphinx detection into AddSphinxTarget.cmake" This reverts commit r302025. clang and lld need to be updated too so they don't break with this patch. llvm-svn: 302054 --- cmake/config-ix.cmake | 10 ++++++++++ cmake/modules/AddSphinxTarget.cmake | 13 ------------- docs/CMakeLists.txt | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index de8e9bf9a49..0331d0fa10a 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -530,6 +530,16 @@ 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.") diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake index c3a676d3063..cfc7f38e9e7 100644 --- a/cmake/modules/AddSphinxTarget.cmake +++ b/cmake/modules/AddSphinxTarget.cmake @@ -1,16 +1,3 @@ - -# 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 diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 4437610146c..6dff219ae37 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -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()