context.build_target(target='gmx', parallel=True,
continue_on_failure=True)
- context.build_target(target='manual', parallel=False,
+ context.build_target(target='manual', parallel=True,
target_descr='PDF manual', continue_on_failure=True)
logfile = os.path.join(context.workspace.build_dir, 'docs/manual/gromacs.log')
if os.path.isfile(logfile):
# separately causes many of the Doxygen targets to get built twice if run
# from a tarball.
if not release:
- context.build_target(target='doxygen-all', parallel=False,
+ context.build_target(target='doxygen-all', parallel=True,
target_descr='Doxygen documentation', continue_on_failure=True)
- context.build_target(target='check-source', parallel=False,
+ context.build_target(target='check-source', parallel=True,
failure_string='check-source failed to run', continue_on_failure=True)
logs = []
for target in ('check-source', 'doxygen-xml', 'doxygen-user',
if context.failed:
return
- context.build_target(target='sphinx-input', parallel=False,
+ context.build_target(target='sphinx-input', parallel=True,
failure_string='Generating Sphinx input failed',
continue_on_failure=True)
- context.build_target(target='sphinx-programs', parallel=False,
+ context.build_target(target='sphinx-programs', parallel=True,
failure_string='Running gmx help -export rst failed',
continue_on_failure=True)
if context.failed:
))
logs = []
for target, log, descr in sphinx_targets:
- context.build_target(target=target, parallel=False,
+ context.build_target(target=target, parallel=True,
failure_string='Sphinx: {0} generation failed'.format(descr),
continue_on_failure=True)
logfile = os.path.join(context.workspace.build_dir,
if context.failed:
return
- context.build_target(target='webpage', parallel=False)
+ context.build_target(target='webpage', parallel=True)
if context.failed:
return
endif()
foreach(_file ${ARG_FILES})
set(_source ${ARG_FROM}/${_file})
+ get_filename_component(_filepath ${_file} DIRECTORY)
+ get_filename_component(_filename ${_source} NAME)
+ set(_targetdir ${_SPHINX_INPUT_ROOT}/${ARG_TO}/${_filepath})
+ set(_result ${_targetdir}/${_filename})
set(_target ${_SPHINX_INPUT_ROOT}/${ARG_TO}${_file})
+ add_custom_command(
+ OUTPUT ${_targetdir}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${_targetdir}
+ )
add_custom_command(
OUTPUT ${_target}
COMMAND ${CMAKE_COMMAND} -E copy ${_source} ${_target}
- DEPENDS ${_source}
+ DEPENDS ${_source} ${_targetdir}
COMMENT "Copying Sphinx input file ${ARG_PREFIX}${_file}"
VERBATIM)
list(APPEND _SPHINX_INPUT_FILES ${_target})
endif()
foreach(_file ${ARG_FILES})
set(_source ${ARG_FROM}/${_file})
- string(REGEX REPLACE "pdf" "png" _tmp ${_file})
- set(_target ${_SPHINX_INPUT_ROOT}/${ARG_TO}${_tmp})
+ get_filename_component(_filepath ${_file} DIRECTORY)
+ get_filename_component(_filename ${_source} NAME)
+ string(REGEX REPLACE "pdf" "png" _tmp ${_filename})
+ set(_targetdir ${_SPHINX_INPUT_ROOT}/${ARG_TO}/${_filepath})
+ set(_target ${_targetdir}/${_tmp})
+ add_custom_command(
+ OUTPUT ${_targetdir}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${_targetdir}
+ )
add_custom_command(
OUTPUT ${_target}
COMMAND convert ${_source} -antialias -quality 03 -quiet -pointsize 12 -density 1200 -units PixelsPerInch ${_target}
- DEPENDS ${_source}
+ DEPENDS ${_source} ${_targetdir}
COMMENT "Converting Sphinx input graphics file ${_file} to png"
VERBATIM)
list(APPEND _SPHINX_IMAGE_CONVERSION_FILES ${_target})
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
set(_deps doxygen-source-timestamp doxygen-version
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-${TYPE})
set(_fast_arg "")
- if ("${ARGN}" STREQUAL "DEPGRAPHS")
+ list (FIND ARGN "DEPGRAPHS" _index)
+ if (${_index} GREATER -1)
set(_fast_arg "ADD_FAST_TARGET")
if (TARGET dep-graphs-dot)
list(APPEND _deps dep-graphs-dot)
endif()
endif()
+ list (FIND ARGN "DEPGRAPHS" _index)
+ if (${_index} GREATER -1)
+ list(APPEND _deps doxygen-xml)
+ endif()
gmx_add_custom_output_target(${TARGET} OUTPUT STAMP ${_fast_arg}
# Ensure the directory exists to avoid spurious warnings
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPGRAPH_DIR}
endif()
# Create the actual targets to build the documentation.
- add_doxygen_target(doxygen-full full "Generating full documentation with Doxygen" DEPGRAPHS)
- add_doxygen_target(doxygen-lib lib "Generating library documentation with Doxygen" DEPGRAPHS)
- add_doxygen_target(doxygen-user user "Generating public API documentation with Doxygen")
- add_doxygen_target(doxygen-dev dev "Generating verbose developer docs with Doxygen" DEPGRAPHS)
+ add_doxygen_target(doxygen-full full "Generating full documentation with Doxygen" DEPGRAPHS DEPXML)
+ add_doxygen_target(doxygen-lib lib "Generating library documentation with Doxygen" DEPGRAPHS DEPXML)
+ add_doxygen_target(doxygen-user user "Generating public API documentation with Doxygen" DEPXML)
+ add_doxygen_target(doxygen-dev dev "Generating verbose developer docs with Doxygen" DEPGRAPHS DEPXML)
# Convenience targets to build all the documentation flavors.
add_custom_target(doxygen-all)
add_custom_target(doxygen-all-fast)