Teach add_sphinx_target() to respect the LLVM_INSTALL_TOOLCHAIN_ONLY CMake
authorDan Liew <dan@su-root.co.uk>
Mon, 28 Apr 2014 22:06:20 +0000 (22:06 +0000)
committerDan Liew <dan@su-root.co.uk>
Mon, 28 Apr 2014 22:06:20 +0000 (22:06 +0000)
option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207450 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/AddSphinxTarget.cmake

index 1ba77a4d24dcfe13ec0e44017ef0d8fe1ce0e7a6..fc28a49407804405ef2fe00c20097f1791fa16aa 100644 (file)
@@ -39,16 +39,18 @@ function (add_sphinx_target builder project)
     add_dependencies(sphinx ${SPHINX_TARGET_NAME})
 
     # Handle installation
-    if (builder STREQUAL man)
-      # FIXME: We might not ship all the tools that these man pages describe
-      install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
-              DESTINATION share/man/man1)
+    if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+      if (builder STREQUAL man)
+        # FIXME: We might not ship all the tools that these man pages describe
+        install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
+                DESTINATION share/man/man1)
 
-    elseif (builder STREQUAL html)
-      install(DIRECTORY "${SPHINX_BUILD_DIR}"
-              DESTINATION "share/doc/${project}")
-    else()
-      message(WARNING Installation of ${builder} not supported)
+      elseif (builder STREQUAL html)
+        install(DIRECTORY "${SPHINX_BUILD_DIR}"
+                DESTINATION "share/doc/${project}")
+      else()
+        message(WARNING Installation of ${builder} not supported)
+      endif()
     endif()
   endif()
 endfunction()