From c3b0fe09a69528e007f0e6c9601a275ad8ec253c Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@stfc.ac.uk> Date: Mon, 2 Jun 2014 13:26:57 +0100 Subject: [PATCH] Exclude the sphinx docs by default from VS build Refs #9559 --- .../MantidPlot/docs/python/CMakeLists.txt | 24 +++++++------------ Code/Mantid/docs/CMakeLists.txt | 12 ++++++---- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/Code/Mantid/MantidPlot/docs/python/CMakeLists.txt b/Code/Mantid/MantidPlot/docs/python/CMakeLists.txt index 8f761161f7f..250885f4435 100644 --- a/Code/Mantid/MantidPlot/docs/python/CMakeLists.txt +++ b/Code/Mantid/MantidPlot/docs/python/CMakeLists.txt @@ -60,26 +60,20 @@ if ( SPHINX_FOUND ) DEPENDS ${SPHINX_CONF_FILES} COMMENT "Generating Python API for sphinx" ) - set_property ( TARGET ${TARGET_NAME}-generateapi PROPERTY FOLDER "Documentation/python" ) + # Group within VS and exclude from whole build + set_target_properties ( ${TARGET_NAME}-generateapi PROPERTIES FOLDER "Documentation/python" + EXCLUDE_FROM_DEFAULT_BUILD 1 + EXCLUDE_FROM_ALL 1) + # HTML target set ( SPHINX_HTML_BUILD ${SPHINX_BUILD}/html ) add_custom_target ( ${TARGET_NAME}-html COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MantidPlot -xq runsphinx_html.py COMMENT "Build Sphinx html documentation" ) - set_property ( TARGET ${TARGET_NAME}-html PROPERTY FOLDER "Documentation/python" ) - add_dependencies( ${TARGET_NAME}-html ${TARGET_NAME}-generateapi ) - - # Latex target - set ( SPHINX_LATEX_BUILD ${SPHINX_BUILD}/latex ) - add_custom_target ( ${TARGET_NAME}-latex - COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MantidPlot -xq runsphinx_latex.py - COMMENT "Build Python Sphinx latex documentation" - ) - set_property ( TARGET ${TARGET_NAME}-latex PROPERTY FOLDER "Documentation/python" ) - add_dependencies( ${TARGET_NAME}-latex ${TARGET_NAME}-generateapi ) - - - + # Group within VS and exclude from whole build + set_target_properties ( ${TARGET_NAME}-html PROPERTIES FOLDER "Documentation/python" + EXCLUDE_FROM_DEFAULT_BUILD 1 + EXCLUDE_FROM_ALL 1) endif () diff --git a/Code/Mantid/docs/CMakeLists.txt b/Code/Mantid/docs/CMakeLists.txt index 31c6e117b4f..953974978a3 100644 --- a/Code/Mantid/docs/CMakeLists.txt +++ b/Code/Mantid/docs/CMakeLists.txt @@ -21,8 +21,10 @@ if ( SPHINX_FOUND ) COMMAND ${DOCS_RUNNER_EXE} -xq runsphinx_html.py COMMENT "Building html documentation" ) - # Group within VS - set_property ( TARGET ${TARGET_PREFIX}-html PROPERTY FOLDER "Documentation" ) + # Group within VS and exclude from whole build + set_target_properties ( ${TARGET_PREFIX}-html PROPERTIES FOLDER "Documentation" + EXCLUDE_FROM_DEFAULT_BUILD 1 + EXCLUDE_FROM_ALL 1) # doctest target set ( BUILDER doctest ) @@ -31,8 +33,10 @@ if ( SPHINX_FOUND ) COMMAND ${DOCS_RUNNER_EXE} -xq runsphinx_doctest.py COMMENT "Running documentation tests" ) - set_property ( TARGET ${TARGET_PREFIX}-test PROPERTY FOLDER "Documentation" ) - + # Group within VS and exclude from whole build + set_target_properties ( ${TARGET_PREFIX}-test PROPERTIES FOLDER "Documentation" + EXCLUDE_FROM_DEFAULT_BUILD 1 + EXCLUDE_FROM_ALL 1) endif () -- GitLab