浏览代码

Merge topic 'doc-no-depend'

c273906f Utilities/Sphinx: Build documentation independently by default

Acked-by: Kitware Robot <[email protected]>
Merge-request: !786
Brad King 8 年之前
父节点
当前提交
4804c7f30f
共有 1 个文件被更改,包括 14 次插入12 次删除
  1. 14 12
      Utilities/Sphinx/CMakeLists.txt

+ 14 - 12
Utilities/Sphinx/CMakeLists.txt

@@ -128,18 +128,20 @@ endforeach()
 
 add_custom_target(documentation ALL DEPENDS ${doc_format_outputs})
 
-foreach(t
-    cmake
-    ccmake
-    cmake-gui
-    cpack
-    ctest
-    )
-  if(TARGET ${t})
-    # Build documentation after main executables.
-    add_dependencies(documentation ${t})
-  endif()
-endforeach()
+if(CMake_SPHINX_DEPEND_ON_EXECUTABLES)
+  foreach(t
+      cmake
+      ccmake
+      cmake-gui
+      cpack
+      ctest
+      )
+    if(TARGET ${t})
+      # Build documentation after main executables.
+      add_dependencies(documentation ${t})
+    endif()
+  endforeach()
+endif()
 
 if(SPHINX_MAN)
   file(GLOB man_rst RELATIVE ${CMake_SOURCE_DIR}/Help/manual