mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
docs: require specific version of doc tools
Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
This commit is contained in:
parent
153d8cfb12
commit
40e73e648a
@ -310,7 +310,8 @@ endif()
|
|||||||
#
|
#
|
||||||
if (BUILDDOC)
|
if (BUILDDOC)
|
||||||
# Add a target to generate API documentation with Doxygen
|
# Add a target to generate API documentation with Doxygen
|
||||||
find_package (Doxygen REQUIRED)
|
find_package (Doxygen 1.8 REQUIRED)
|
||||||
|
if (DOXYGEN_FOUND AND DOXYGEN_VERSION VERSION_GREATER "1.8")
|
||||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
||||||
if (BUILDSWIGJAVA)
|
if (BUILDSWIGJAVA)
|
||||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/Doxyfile.java.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-java @ONLY)
|
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/Doxyfile.java.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile-java @ONLY)
|
||||||
@ -325,12 +326,16 @@ if (BUILDDOC)
|
|||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||||
)
|
)
|
||||||
|
else ()
|
||||||
|
message (SEND_ERROR "ERROR - Failed to find a compatible version of Doxygen. API doc will not be generated")
|
||||||
|
endif (DOXYGEN_FOUND AND DOXYGEN_VERSION VERSION_GREATER "1.8")
|
||||||
|
|
||||||
# Check if Sphinx is installed and add target to generate API documentation
|
# Check if Sphinx is installed and add target to generate API documentation
|
||||||
# Currently, the per-module documentation for python is generated from the
|
# Currently, the per-module documentation for python is generated from the
|
||||||
# python2 modules.
|
# python2 modules.
|
||||||
if(BUILDSWIGPYTHON)
|
if(BUILDSWIGPYTHON)
|
||||||
find_package (Sphinx REQUIRED)
|
find_package (Sphinx 1.3 REQUIRED)
|
||||||
|
if (SPHINX_FOUND AND SPHINX_VERSION VERSION_GREATER "1.3")
|
||||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/conf.py.in ${CMAKE_CURRENT_BINARY_DIR}/pydoc/conf.py @ONLY)
|
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/conf.py.in ${CMAKE_CURRENT_BINARY_DIR}/pydoc/conf.py @ONLY)
|
||||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/index.rst ${CMAKE_CURRENT_BINARY_DIR}/pydoc/index.rst COPYONLY)
|
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/doxy/index.rst ${CMAKE_CURRENT_BINARY_DIR}/pydoc/index.rst COPYONLY)
|
||||||
add_custom_target (pydoc ALL
|
add_custom_target (pydoc ALL
|
||||||
@ -346,11 +351,15 @@ if (BUILDDOC)
|
|||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT "Generating API documentation with Sphinx" VERBATIM
|
COMMENT "Generating API documentation with Sphinx" VERBATIM
|
||||||
)
|
)
|
||||||
|
else ()
|
||||||
|
message (SEND_ERROR "ERROR - Failed to find a compatible version of Sphinx. Python API doc will not be generated")
|
||||||
|
endif ()
|
||||||
endif(BUILDSWIGPYTHON)
|
endif(BUILDSWIGPYTHON)
|
||||||
|
|
||||||
# Check if Yuidoc is installed and add target for API documentation
|
# Check if Yuidoc is installed and add target for API documentation
|
||||||
if(BUILDSWIGNODE)
|
if(BUILDSWIGNODE)
|
||||||
find_package(Yuidoc REQUIRED)
|
find_package (Yuidoc 0.10 REQUIRED)
|
||||||
|
if (YUIDOC_FOUND AND YUIDOC_VERSION VERSION_GREATER "0.10")
|
||||||
add_custom_target (jsdoc ALL
|
add_custom_target (jsdoc ALL
|
||||||
COMMAND ${CMAKE_SOURCE_DIR}/doxy/doxygen2jsdoc/docgen.js -m upm -i xml -o jsdoc -t ${CMAKE_CURRENT_SOURCE_DIR}/src -g ../../
|
COMMAND ${CMAKE_SOURCE_DIR}/doxy/doxygen2jsdoc/docgen.js -m upm -i xml -o jsdoc -t ${CMAKE_CURRENT_SOURCE_DIR}/src -g ../../
|
||||||
COMMAND ${YUIDOC_EXECUTABLE} -C --no-sort --helpers ${CMAKE_SOURCE_DIR}/doxy/node/generators/yuidoc/helper.js --themedir ${CMAKE_SOURCE_DIR}/doxy/node/generators/yuidoc/tmpl -o html/node jsdoc/yuidoc/upm
|
COMMAND ${YUIDOC_EXECUTABLE} -C --no-sort --helpers ${CMAKE_SOURCE_DIR}/doxy/node/generators/yuidoc/helper.js --themedir ${CMAKE_SOURCE_DIR}/doxy/node/generators/yuidoc/tmpl -o html/node jsdoc/yuidoc/upm
|
||||||
@ -359,6 +368,9 @@ if (BUILDDOC)
|
|||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMENT "Generating API documentation with Yuidoc" VERBATIM
|
COMMENT "Generating API documentation with Yuidoc" VERBATIM
|
||||||
)
|
)
|
||||||
|
else ()
|
||||||
|
message (SEND_ERROR "ERROR - Failed to find a compatible version of Yuidoc. Node.js API doc will not be generated")
|
||||||
|
endif ()
|
||||||
endif(BUILDSWIGNODE)
|
endif(BUILDSWIGNODE)
|
||||||
endif (BUILDDOC)
|
endif (BUILDDOC)
|
||||||
|
|
||||||
|
@ -17,13 +17,15 @@ find_package_handle_standard_args (Sphinx DEFAULT_MSG
|
|||||||
SPHINX_API_EXECUTABLE
|
SPHINX_API_EXECUTABLE
|
||||||
)
|
)
|
||||||
|
|
||||||
# Get Sphinx version
|
# Get Sphinx Version
|
||||||
if (SPHINX_EXECUTABLE)
|
if (SPHINX_EXECUTABLE)
|
||||||
execute_process(COMMAND ${SPHINX_EXECUTABLE} --version
|
execute_process(COMMAND ${SPHINX_EXECUTABLE} --version
|
||||||
OUTPUT_VARIABLE SPHINX_VERSION)
|
OUTPUT_VARIABLE SPHINX_VERSION_STRING
|
||||||
if(SPHINX_VERSION)
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
string(REGEX MATCH "([0-9]\\.[0-9]\\.[0-9])" SPHINX_VERSION_STR ${SPHINX_VERSION})
|
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||||
message (STATUS "Sphinx version is ${SPHINX_VERSION_STR}")
|
if (SPHINX_VERSION_STRING)
|
||||||
|
string(REPLACE "Sphinx (sphinx-build) " "" SPHINX_VERSION ${SPHINX_VERSION_STRING})
|
||||||
|
message (STATUS "Sphinx version is ${SPHINX_VERSION}")
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user