소스 검색

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