diff options
author | Tom Stellard <tstellar@redhat.com> | 2017-05-03 14:29:56 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2017-05-03 14:29:56 +0000 |
commit | 2891d41ee6991d5254f6642eee79763dfef1d4a2 (patch) | |
tree | eddfc28eb25474dc5097daf209b1f7757cb1b6c2 /cmake | |
parent | cb866d20a6169efe5a9f120511869dfb95755c00 (diff) |
CMake: Move sphinx detection into AddSphinxTarget.cmake
Reviewers: chandlerc, beanz, mgorny
Reviewed By: beanz
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31773
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302025 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-x | cmake/config-ix.cmake | 10 | ||||
-rw-r--r-- | cmake/modules/AddSphinxTarget.cmake | 13 |
2 files changed, 13 insertions, 10 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index 0331d0fa10ab..de8e9bf9a494 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -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.") diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake index cfc7f38e9e77..c3a676d3063d 100644 --- a/cmake/modules/AddSphinxTarget.cmake +++ b/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 |