summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Utilities/Sphinx/CMakeLists.txt26
1 files changed, 14 insertions, 12 deletions
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index edb9469..a29380c 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/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