CMake: Fix docs-llvm-man target when clang+llvm is in the same source tree

Summary:
This was broken by r302499.  Configuring with -DLLVM_BUILD_DOCS=ON would
cause the docs-llvm-man target not to be created.

Reviewers: anemet, beanz

Reviewed By: anemet

Subscribers: llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D33146

llvm-svn: 303042
This commit is contained in:
Tom Stellard 2017-05-15 09:34:23 +00:00
parent 6d2417924c
commit 418a8e3442

View File

@ -1,9 +1,9 @@
# Create sphinx target
if (LLVM_ENABLE_SPHINX AND NOT TARGET sphinx)
if (LLVM_ENABLE_SPHINX)
message(STATUS "Sphinx enabled.")
find_package(Sphinx REQUIRED)
if (LLVM_BUILD_DOCS)
if (LLVM_BUILD_DOCS AND NOT TARGET sphinx)
add_custom_target(sphinx ALL)
endif()
else()