Fixed docs build on Windows (#2398)

This commit is contained in:
Ilya Lavrenov 2020-09-24 12:13:27 +03:00 committed by GitHub
parent 97fad1cb35
commit 071485b81d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 119 additions and 117 deletions

View File

@ -31,7 +31,6 @@ if(NOT ENABLE_DOCKER)
endif() endif()
function(build_docs) function(build_docs)
find_package(Doxygen REQUIRED dot) find_package(Doxygen REQUIRED dot)
find_package(Python3 COMPONENTS Interpreter) find_package(Python3 COMPONENTS Interpreter)
find_package(LATEX) find_package(LATEX)
@ -48,52 +47,50 @@ function(build_docs)
message(FATAL_ERROR "LATEX is required to build the documentation") message(FATAL_ERROR "LATEX is required to build the documentation")
endif() endif()
set(DOCS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(DOCS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
set(DOXYGEN_DIR ${OpenVINO_MAIN_SOURCE_DIR}/docs/doxygen) set(DOXYGEN_DIR "${OpenVINO_MAIN_SOURCE_DIR}/docs/doxygen")
set(IE_SOURCE_DIR ${OpenVINO_MAIN_SOURCE_DIR}/inference-engine) set(IE_SOURCE_DIR "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine")
set(PYTHON_API_IN ${IE_SOURCE_DIR}/ie_bridges/python/src/openvino/inference_engine/ie_api.pyx) set(PYTHON_API_IN "${IE_SOURCE_DIR}/ie_bridges/python/src/openvino/inference_engine/ie_api.pyx")
set(PYTHON_API_OUT ${DOCS_BINARY_DIR}/python_api/ie_api.pyx) set(PYTHON_API_OUT "${DOCS_BINARY_DIR}/python_api/ie_api.pyx")
set(C_API ${IE_SOURCE_DIR}/ie_bridges/c/include) set(C_API "${IE_SOURCE_DIR}/ie_bridges/c/include")
set(PLUGIN_API_DIR ${DOCS_BINARY_DIR}/IE_PLUGIN_DG) set(PLUGIN_API_DIR "${DOCS_BINARY_DIR}/IE_PLUGIN_DG")
# Preprocessing scripts # Preprocessing scripts
set(DOXY_MD_FILTER ${DOXYGEN_DIR}/doxy_md_filter.py) set(DOXY_MD_FILTER "${DOXYGEN_DIR}/doxy_md_filter.py")
set(PYX_FILTER ${DOXYGEN_DIR}/pyx_filter.py) set(PYX_FILTER "${DOXYGEN_DIR}/pyx_filter.py")
file(GLOB_RECURSE doc_source_files file(GLOB_RECURSE doc_source_files
LIST_DIRECTORIES true LIST_DIRECTORIES true RELATIVE ${OpenVINO_MAIN_SOURCE_DIR}
RELATIVE ${OpenVINO_MAIN_SOURCE_DIR} "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.md"
${OpenVINO_MAIN_SOURCE_DIR}/docs/*.md "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.png"
${OpenVINO_MAIN_SOURCE_DIR}/docs/*.png "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.gif"
${OpenVINO_MAIN_SOURCE_DIR}/docs/*.gif "${OpenVINO_MAIN_SOURCE_DIR}/docs/*.jpg"
${OpenVINO_MAIN_SOURCE_DIR}/docs/*.jpg "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.md"
${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.md "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.png"
${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.png "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.gif"
${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.gif "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.jpg")
${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.jpg
)
configure_file(${PYTHON_API_IN} ${PYTHON_API_OUT} @ONLY) configure_file(${PYTHON_API_IN} ${PYTHON_API_OUT} @ONLY)
set(IE_CONFIG_SOURCE ${DOXYGEN_DIR}/ie_docs.config) set(IE_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_docs.config")
set(C_CONFIG_SOURCE ${DOXYGEN_DIR}/ie_c_api.config) set(C_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_c_api.config")
set(PY_CONFIG_SOURCE ${DOXYGEN_DIR}/ie_py_api.config) set(PY_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_py_api.config")
set(PLUGIN_CONFIG_SOURCE ${DOXYGEN_DIR}/ie_plugin_api.config) set(PLUGIN_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_plugin_api.config")
set(IE_CONFIG_BINARY ${DOCS_BINARY_DIR}/ie_docs.config) set(IE_CONFIG_BINARY "${DOCS_BINARY_DIR}/ie_docs.config")
set(C_CONFIG_BINARY ${DOCS_BINARY_DIR}/ie_c_api.config) set(C_CONFIG_BINARY "${DOCS_BINARY_DIR}/ie_c_api.config")
set(PY_CONFIG_BINARY ${DOCS_BINARY_DIR}/ie_py_api.config) set(PY_CONFIG_BINARY "${DOCS_BINARY_DIR}/ie_py_api.config")
set(PLUGIN_CONFIG_BINARY ${DOCS_BINARY_DIR}/ie_plugin_api.config) set(PLUGIN_CONFIG_BINARY "${DOCS_BINARY_DIR}/ie_plugin_api.config")
set(IE_LAYOUT_SOURCE ${DOXYGEN_DIR}/ie_docs.xml) set(IE_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_docs.xml")
set(C_LAYOUT_SOURCE ${DOXYGEN_DIR}/ie_c_api.xml) set(C_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_c_api.xml")
set(PY_LAYOUT_SOURCE ${DOXYGEN_DIR}/ie_py_api.xml) set(PY_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_py_api.xml")
set(PLUGIN_LAYOUT_SOURCE ${DOXYGEN_DIR}/ie_plugin_api.xml) set(PLUGIN_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_plugin_api.xml")
set(IE_LAYOUT_BINARY ${DOCS_BINARY_DIR}/ie_docs.xml) set(IE_LAYOUT_BINARY "${DOCS_BINARY_DIR}/ie_docs.xml")
set(C_LAYOUT_BINARY ${DOCS_BINARY_DIR}/ie_c_api.xml) set(C_LAYOUT_BINARY "${DOCS_BINARY_DIR}/ie_c_api.xml")
set(PY_LAYOUT_BINARY ${DOCS_BINARY_DIR}/ie_py_api.xml) set(PY_LAYOUT_BINARY "${DOCS_BINARY_DIR}/ie_py_api.xml")
set(PLUGIN_LAYOUT_BINARY ${DOCS_BINARY_DIR}/ie_plugin_api.xml) set(PLUGIN_LAYOUT_BINARY "${DOCS_BINARY_DIR}/ie_plugin_api.xml")
# Tables of contents # Tables of contents
configure_file(${IE_LAYOUT_SOURCE} ${IE_LAYOUT_BINARY} @ONLY) configure_file(${IE_LAYOUT_SOURCE} ${IE_LAYOUT_BINARY} @ONLY)
@ -108,80 +105,84 @@ function(build_docs)
configure_file(${PLUGIN_CONFIG_SOURCE} ${PLUGIN_CONFIG_BINARY} @ONLY) configure_file(${PLUGIN_CONFIG_SOURCE} ${PLUGIN_CONFIG_BINARY} @ONLY)
# Preprocessing scripts # Preprocessing scripts
set(DOXY_MD_FILTER ${DOXYGEN_DIR}/doxy_md_filter.py) set(DOXY_MD_FILTER "${DOXYGEN_DIR}/doxy_md_filter.py")
set(PYX_FILTER ${DOXYGEN_DIR}/pyx_filter.py) set(PYX_FILTER "${DOXYGEN_DIR}/pyx_filter.py")
# C API
add_custom_target(c_api add_custom_target(c_api
COMMAND ${DOXYGEN_EXECUTABLE} ${C_CONFIG_BINARY} COMMAND ${DOXYGEN_EXECUTABLE} ${C_CONFIG_BINARY}
WORKING_DIRECTORY ${DOCS_BINARY_DIR} WORKING_DIRECTORY ${DOCS_BINARY_DIR}
COMMENT "Generating C API Reference" COMMENT "Generating C API Reference"
VERBATIM VERBATIM)
)
# Python API
add_custom_target(py_api add_custom_target(py_api
COMMAND ${DOXYGEN_EXECUTABLE} ${PY_CONFIG_BINARY} COMMAND ${DOXYGEN_EXECUTABLE} ${PY_CONFIG_BINARY}
WORKING_DIRECTORY ${DOCS_BINARY_DIR} WORKING_DIRECTORY ${DOCS_BINARY_DIR}
COMMENT "Generating Python API Reference" COMMENT "Generating Python API Reference"
VERBATIM VERBATIM)
)
add_custom_target(plugin_api
COMMAND ${DOXYGEN_EXECUTABLE} ${PLUGIN_CONFIG_BINARY}
WORKING_DIRECTORY ${DOCS_BINARY_DIR}
COMMENT "Generating Plugin API Reference"
VERBATIM
)
add_custom_target(preprocess_docs
COMMENT "Pre-process docs"
VERBATIM
)
add_custom_target(ie_docs
DEPENDS preprocess_docs
COMMAND ${DOXYGEN_EXECUTABLE} ${IE_CONFIG_BINARY}
WORKING_DIRECTORY ${DOCS_BINARY_DIR}
VERBATIM
)
add_custom_target(openvino_docs
DEPENDS c_api py_api ie_docs plugin_api
COMMENT "Generating OpenVINO documentation"
VERBATIM
)
add_custom_command(TARGET py_api add_custom_command(TARGET py_api
PRE_BUILD PRE_BUILD
COMMAND ${Python3_EXECUTABLE} ${PYX_FILTER} ${PYTHON_API_OUT} COMMAND ${Python3_EXECUTABLE} ${PYX_FILTER} ${PYTHON_API_OUT}
COMMENT "Pre-process Python API." COMMENT "Pre-process Python API")
)
# Plugin API
add_custom_target(plugin_api
COMMAND ${DOXYGEN_EXECUTABLE} ${PLUGIN_CONFIG_BINARY}
WORKING_DIRECTORY ${DOCS_BINARY_DIR}
COMMENT "Generating Plugin API Reference"
VERBATIM)
# Preprocess docs
add_custom_target(preprocess_docs
COMMENT "Pre-process docs"
VERBATIM)
foreach(source_file ${doc_source_files}) foreach(source_file ${doc_source_files})
add_custom_command(TARGET preprocess_docs list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy
PRE_BUILD "${OpenVINO_MAIN_SOURCE_DIR}/${source_file}" "${DOCS_BINARY_DIR}/${source_file}")
COMMAND ${CMAKE_COMMAND} -E copy ${OpenVINO_MAIN_SOURCE_DIR}/${source_file} ${DOCS_BINARY_DIR}/${source_file})
endforeach() endforeach()
add_custom_command(TARGET preprocess_docs add_custom_command(TARGET preprocess_docs
PRE_BUILD PRE_BUILD
COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER} ${DOCS_BINARY_DIR} ${commands}
COMMENT "Pre-process markdown and image links." COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER} ${DOCS_BINARY_DIR}
) COMMENT "Pre-process markdown and image links")
set_target_properties(ie_docs PROPERTIES FOLDER docs) # IE dev guide and C++ API
add_custom_target(ie_docs
DEPENDS preprocess_docs
COMMAND ${DOXYGEN_EXECUTABLE} ${IE_CONFIG_BINARY}
WORKING_DIRECTORY ${DOCS_BINARY_DIR}
VERBATIM)
# Umbrella OpenVINO target
add_custom_target(openvino_docs
DEPENDS c_api py_api ie_docs plugin_api
COMMENT "Generating OpenVINO documentation"
VERBATIM)
set_target_properties(openvino_docs ie_docs c_api py_api preprocess_docs plugin_api
PROPERTIES FOLDER docs)
find_program(browser NAMES xdg-open) find_program(browser NAMES xdg-open)
if(browser) if(browser)
add_custom_target(ie_docs_open add_custom_target(ie_docs_open
COMMAND ${browser} "${OpenVINO_MAIN_SOURCE_DIR}/doc/html/index.html" COMMAND ${browser} "${OpenVINO_MAIN_SOURCE_DIR}/docs/html/index.html"
DEPENDS ie_docs DEPENDS ie_docs
COMMENT "Open OpenVINO documentation" COMMENT "Open OpenVINO documentation"
VERBATIM) VERBATIM)
set_target_properties(ie_docs_open PROPERTIES FOLDER docs) set_target_properties(ie_docs_open PROPERTIES FOLDER docs)
endif() endif()
endfunction() endfunction()
if (ENABLE_DOCS) if(ENABLE_DOCS)
build_docs() build_docs()
endif() endif()

View File

@ -46,8 +46,4 @@ Below we define these rules as follows:
- Non-unified quantization parameters for Eltwise and Concat operations. - Non-unified quantization parameters for Eltwise and Concat operations.
- Non-quantized network output, i.e. there are no quantization parameters for it. - Non-quantized network output, i.e. there are no quantization parameters for it.
## Quantized model inference
!!! Need details from the runtime team.
[qdq_propagation]: ../images/qdq_propagation.png [qdq_propagation]: ../images/qdq_propagation.png

View File

@ -16,10 +16,10 @@ PREDEFINED = "__attribute__(x)=" \
FILE_PATTERNS = *.h FILE_PATTERNS = *.h
LAYOUT_FILE = @C_LAYOUT_BINARY@ LAYOUT_FILE = "@C_LAYOUT_BINARY@"
INPUT = @C_API@ INPUT = "@C_API@"
HTML_OUTPUT = ie_c_api HTML_OUTPUT = ie_c_api
GENERATE_TAGFILE = @DOCS_BINARY_DIR@/ie_c_api.tag GENERATE_TAGFILE = "@DOCS_BINARY_DIR@/ie_c_api.tag"

View File

@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If # entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used. # left blank the current directory will be used.
OUTPUT_DIRECTORY = @DOCS_BINARY_DIR@/html OUTPUT_DIRECTORY = "@DOCS_BINARY_DIR@/html"
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and # directories (in 2 levels) under the output directory of each output format and
@ -823,8 +823,8 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched. # Note: If this tag is empty the current directory is searched.
INPUT = @DOCS_BINARY_DIR@ \ INPUT = "@DOCS_BINARY_DIR@" \
@IE_SOURCE_DIR@/include "@IE_SOURCE_DIR@/include"
# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@ -2262,7 +2262,7 @@ TAGFILES =
# tag file that is based on the input files it reads. See section "Linking to # tag file that is based on the input files it reads. See section "Linking to
# external documentation" for more information about the usage of tag files. # external documentation" for more information about the usage of tag files.
GENERATE_TAGFILE = @DOCS_BINARY_DIR@/ie_api.tag GENERATE_TAGFILE = "@DOCS_BINARY_DIR@/ie_api.tag"
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in # If the ALLEXTERNALS tag is set to YES, all external class will be listed in
# the class index. If set to NO, only the inherited external classes will be # the class index. If set to NO, only the inherited external classes will be
@ -2496,7 +2496,7 @@ INTERACTIVE_SVG = NO
# found. If left blank, it is assumed the dot tool can be found in the path. # found. If left blank, it is assumed the dot tool can be found in the path.
# This tag requires that the tag HAVE_DOT is set to YES. # This tag requires that the tag HAVE_DOT is set to YES.
DOT_PATH = DOT_PATH = "@DOXYGEN_DOT_EXECUTABLE@"
# The DOTFILE_DIRS tag can be used to specify one or more directories that # The DOTFILE_DIRS tag can be used to specify one or more directories that
# contain dot files that are included in the documentation (see the \dotfile # contain dot files that are included in the documentation (see the \dotfile

View File

@ -1,15 +1,15 @@
@INCLUDE = @IE_CONFIG_BINARY@ @INCLUDE = @IE_CONFIG_BINARY@
LAYOUT_FILE = @PLUGIN_LAYOUT_BINARY@ LAYOUT_FILE = "@PLUGIN_LAYOUT_BINARY@"
HTML_OUTPUT = ie_plugin_api HTML_OUTPUT = ie_plugin_api
GENERATE_TAGFILE = @DOCS_BINARY_DIR@/ie_plugin_api.tag GENERATE_TAGFILE = "@DOCS_BINARY_DIR@/ie_plugin_api.tag"
EXTRACT_LOCAL_CLASSES = NO EXTRACT_LOCAL_CLASSES = NO
INPUT = @DOCS_BINARY_DIR@/docs/IE_PLUGIN_DG \ INPUT = "@DOCS_BINARY_DIR@/docs/IE_PLUGIN_DG" \
@IE_SOURCE_DIR@/src/plugin_api "@IE_SOURCE_DIR@/src/plugin_api"
FILE_PATTERNS = *.c \ FILE_PATTERNS = *.c \
*.cpp \ *.cpp \
@ -27,14 +27,15 @@ EXCLUDE_PATTERNS = cnn_network_ngraph_impl.hpp \
EXCLUDE_SYMBOLS = EXCLUDE_SYMBOLS =
EXAMPLE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/template_plugin/src \ EXAMPLE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/src" \
@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/include \ "@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/include" \
@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/src/CMakeLists.txt \ "@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/src/CMakeLists.txt" \
@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/tests/functional/CMakeLists.txt \ "@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/tests/functional/"
@CMAKE_CURRENT_SOURCE_DIR@/examples CMakeLists.txt \
"@CMAKE_CURRENT_SOURCE_DIR@/examples"
EXAMPLE_PATTERNS = *.cpp \ EXAMPLE_PATTERNS = *.cpp \
*.hpp *.hpp
ENUM_VALUES_PER_LINE = 1 ENUM_VALUES_PER_LINE = 1

View File

@ -26,10 +26,10 @@ EXTENSION_MAPPING = pyx=Python
FILE_PATTERNS = *.pyx FILE_PATTERNS = *.pyx
LAYOUT_FILE = @PY_LAYOUT_BINARY@ LAYOUT_FILE = "@PY_LAYOUT_BINARY@"
INPUT = @PYTHON_API_OUT@ INPUT = "@PYTHON_API_OUT@"
HTML_OUTPUT = ie_python_api HTML_OUTPUT = ie_python_api
GENERATE_TAGFILE = @DOCS_BINARY_DIR@/ie_python_api.tag GENERATE_TAGFILE = "@DOCS_BINARY_DIR@/ie_python_api.tag"

View File

@ -42,6 +42,10 @@ function(build_with_lto)
endif() endif()
add_subdirectory(clDNN) add_subdirectory(clDNN)
# disable CLDNN docs build
set_target_properties(docs PROPERTIES EXCLUDE_FROM_ALL ON
FOLDER docs)
endif() endif()
function(ie_build_pugixml) function(ie_build_pugixml)