From 5651a4767e2145e58e42c6752f0b826f49e74fbd Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 17 Jun 2021 15:44:08 +0300 Subject: [PATCH 1/5] =?UTF-8?q?=D0=93=D0=B5=D0=BD=D0=B5=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB=D0=BE=D0=B2=D0=BE?= =?UTF-8?q?=D1=87=D0=BD=D0=BE=D0=B3=D0=BE=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0?= =?UTF-8?q?=20=D1=81=20=D0=B8=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B5=D0=B9=20=D0=BE=20=D1=80=D0=B5=D0=BF=D0=BE=D0=B7?= =?UTF-8?q?=D0=B8=D1=82=D0=BE=D1=80=D0=B8=D0=B8=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCommon.cmake | 1 + CMLibGit.cmake | 14 ++++++++++++++ CMLibGitVersion.cmake | 28 ++++++++++++++++++++++++++++ hpp/cmlib_git_version.hpp.in | 31 +++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 CMLibGit.cmake create mode 100644 CMLibGitVersion.cmake create mode 100644 hpp/cmlib_git_version.hpp.in diff --git a/CMLibCommon.cmake b/CMLibCommon.cmake index 1851fd0..53d088d 100644 --- a/CMLibCommon.cmake +++ b/CMLibCommon.cmake @@ -50,6 +50,7 @@ include(CMLibDocDoxygen) include(CMLibDocBreathe) include(CMLibQtTranslation) include(CMLibToday) +include(CMLibGit) include(CMLibAuxilarySymlinks) include(CMLibGeneratePrivateConfigHPP) include(CMLibNinjaGeneratorHelper) diff --git a/CMLibGit.cmake b/CMLibGit.cmake new file mode 100644 index 0000000..7733432 --- /dev/null +++ b/CMLibGit.cmake @@ -0,0 +1,14 @@ +set(output_file ${CMAKE_BINARY_DIR}/include/cmlib_git_version.hpp) +if(CMLIB_GENERATED_HEADERS_PATH) + set(output_file ${CMLIB_GENERATED_HEADERS_PATH}/cmlib_git_version.hpp) +elseif(ARGV0) + set(output_file ${ARGV0}) +endif() + +add_custom_target(git-version ALL ${CMAKE_COMMAND} + -DCMLIB_PROJECT_NAME_UPPER=${CMLIB_PROJECT_NAME_UPPER} + -DCMLIB_MODULE_DIR=${CMLIB_MODULE_DIR} + -DCMLIB_GIT_VERSION_FILE=${output_file} -P ${CMLIB_MODULE_DIR}/CMLibGitVersion.cmake + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) + +unset(output_file) diff --git a/CMLibGitVersion.cmake b/CMLibGitVersion.cmake new file mode 100644 index 0000000..880c071 --- /dev/null +++ b/CMLibGitVersion.cmake @@ -0,0 +1,28 @@ +set(CMLIB_GIT_REV "N/A") +set(CMLIB_GIT_DIFF "") +set(CMLIB_GIT_TAG "N/A") +set(CMLIB_GIT_BRANCH "N/A") + +message("aaaaaa") + +find_program(GIT_EXECUTABLE git) +if(GIT_EXECUTABLE) + execute_process(COMMAND git log --pretty=format:'%h' -n 1 OUTPUT_VARIABLE CMLIB_GIT_REV ERROR_QUIET) + + # Check whether we got any revision (which isn't + # always the case, e.g. when someone downloaded a zip + # file from Github instead of a checkout) + if(NOT "${CMLIB_GIT_REV}" STREQUAL "") + execute_process(COMMAND bash -c "git diff --quiet --exit-code || echo +" OUTPUT_VARIABLE CMLIB_GIT_DIFF) + execute_process(COMMAND git describe --exact-match --tags OUTPUT_VARIABLE CMLIB_GIT_TAG ERROR_QUIET) + execute_process(COMMAND git rev-parse --abbrev-ref HEAD OUTPUT_VARIABLE CMLIB_GIT_BRANCH) + + string(STRIP "${CMLIB_GIT_REV}" CMLIB_GIT_REV) + string(SUBSTRING "${CMLIB_GIT_REV}" 1 8 CMLIB_GIT_REV) + string(STRIP "${CMLIB_GIT_DIFF}" CMLIB_GIT_DIFF) + string(STRIP "${CMLIB_GIT_TAG}" CMLIB_GIT_TAG) + string(STRIP "${CMLIB_GIT_BRANCH}" CMLIB_GIT_BRANCH) + endif() +endif() + +configure_file(${CMLIB_MODULE_DIR}/hpp/cmlib_git_version.hpp.in ${CMLIB_GIT_VERSION_FILE}) diff --git a/hpp/cmlib_git_version.hpp.in b/hpp/cmlib_git_version.hpp.in new file mode 100644 index 0000000..bfcba46 --- /dev/null +++ b/hpp/cmlib_git_version.hpp.in @@ -0,0 +1,31 @@ +#ifndef @CMLIB_PROJECT_NAME_UPPER@_CMLIB_GIT_VERSION_HPP_ +#define @CMLIB_PROJECT_NAME_UPPER@_CMLIB_GIT_VERSION_HPP_ + +#pragma once + +#if defined (@CMLIB_PROJECT_NAME_UPPER@_GIT_REV) +#error "Duplicate definition of macros @CMLIB_PROJECT_NAME_UPPER@_GIT_REV" +#else +#define @CMLIB_PROJECT_NAME_UPPER@_GIT_REV "@CMLIB_GIT_REV@" +#endif + +#if defined (@CMLIB_PROJECT_NAME_UPPER@_GIT_DIFF) +#error "Duplicate definition of macros @CMLIB_PROJECT_NAME_UPPER@_GIT_DIFF" +#else +#define @CMLIB_PROJECT_NAME_UPPER@_GIT_DIFF "@CMLIB_GIT_DIFF@" +#endif + +#if defined (@CMLIB_PROJECT_NAME_UPPER@_GIT_BRANCH) +#error "Duplicate definition of macros @CMLIB_PROJECT_NAME_UPPER@_GIT_BRANCH" +#else +#define @CMLIB_PROJECT_NAME_UPPER@_GIT_BRANCH "@CMLIB_GIT_BRANCH@" +#endif + +#if defined (@CMLIB_PROJECT_NAME_UPPER@_GIT_TAG) +#error "Duplicate definition of macros @CMLIB_PROJECT_NAME_UPPER@_GIT_TAG" +#else +#define @CMLIB_PROJECT_NAME_UPPER@_GIT_TAG "@CMLIB_GIT_TAG@" +#endif + +#endif /* @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_GIT_VERSION_HPP_ */ + From d8c4257a0c9da457753b5ea12db3f7e83cf5297a Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 17 Jun 2021 15:46:15 +0300 Subject: [PATCH 2/5] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=80=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80=20?= =?UTF-8?q?=D0=BC=D0=B0=D0=BA=D1=80=D0=BE=D1=81=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hpp/cmlib_private_config.hpp.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hpp/cmlib_private_config.hpp.in b/hpp/cmlib_private_config.hpp.in index d5a3de6..ce055d0 100644 --- a/hpp/cmlib_private_config.hpp.in +++ b/hpp/cmlib_private_config.hpp.in @@ -1,10 +1,10 @@ -#ifndef @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_CONFIG_HPP_ -#define @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_CONFIG_HPP_ +#ifndef @CMLIB_PROJECT_NAME_UPPER@_CMLIB_CONFIG_HPP_ +#define @CMLIB_PROJECT_NAME_UPPER@_CMLIB_CONFIG_HPP_ #pragma once -#define @CMLIB_PROJECT_NAME_CANONICAL@_VERSION_STR "@PROJECT_VERSION@" -#define @CMLIB_PROJECT_NAME_CANONICAL@_VERSION_INT @PROJECT_VERSION_INT@ +#define @CMLIB_PROJECT_NAME_UPPER@_VERSION_STR "@PROJECT_VERSION@" +#define @CMLIB_PROJECT_NAME_UPPER@_VERSION_INT @PROJECT_VERSION_INT@ #if defined (CMLIB_ORGANIZATION_NAME) #error "Duplicate definition of macros CMLIB_ORGANIZATION_NAME" @@ -90,5 +90,5 @@ #define CMLIB_BUILD_DATE "@TODAY@" #endif -#endif /* @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_CONFIG_HPP_ */ +#endif /* @CMLIB_PROJECT_NAME_UPPER@_CMLIB_CONFIG_HPP_ */ From ff553609375f4257e9ae3cf584b4ff5c9b868e49 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 17 Jun 2021 15:48:21 +0300 Subject: [PATCH 3/5] =?UTF-8?q?=D0=A7=D0=B8=D1=81=D1=82=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibGit.cmake | 10 ++++++---- CMLibGitVersion.cmake | 4 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMLibGit.cmake b/CMLibGit.cmake index 7733432..94ced49 100644 --- a/CMLibGit.cmake +++ b/CMLibGit.cmake @@ -5,10 +5,12 @@ elseif(ARGV0) set(output_file ${ARGV0}) endif() -add_custom_target(git-version ALL ${CMAKE_COMMAND} - -DCMLIB_PROJECT_NAME_UPPER=${CMLIB_PROJECT_NAME_UPPER} - -DCMLIB_MODULE_DIR=${CMLIB_MODULE_DIR} - -DCMLIB_GIT_VERSION_FILE=${output_file} -P ${CMLIB_MODULE_DIR}/CMLibGitVersion.cmake +# cmake-format: off +add_custom_target(git-version ALL + ${CMAKE_COMMAND} -DCMLIB_PROJECT_NAME_UPPER=${CMLIB_PROJECT_NAME_UPPER} + -DCMLIB_MODULE_DIR=${CMLIB_MODULE_DIR} + -DCMLIB_GIT_VERSION_FILE=${output_file} -P ${CMLIB_MODULE_DIR}/CMLibGitVersion.cmake WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +# cmake-format: on unset(output_file) diff --git a/CMLibGitVersion.cmake b/CMLibGitVersion.cmake index 880c071..fbb9bad 100644 --- a/CMLibGitVersion.cmake +++ b/CMLibGitVersion.cmake @@ -3,8 +3,6 @@ set(CMLIB_GIT_DIFF "") set(CMLIB_GIT_TAG "N/A") set(CMLIB_GIT_BRANCH "N/A") -message("aaaaaa") - find_program(GIT_EXECUTABLE git) if(GIT_EXECUTABLE) execute_process(COMMAND git log --pretty=format:'%h' -n 1 OUTPUT_VARIABLE CMLIB_GIT_REV ERROR_QUIET) @@ -18,7 +16,7 @@ if(GIT_EXECUTABLE) execute_process(COMMAND git rev-parse --abbrev-ref HEAD OUTPUT_VARIABLE CMLIB_GIT_BRANCH) string(STRIP "${CMLIB_GIT_REV}" CMLIB_GIT_REV) - string(SUBSTRING "${CMLIB_GIT_REV}" 1 8 CMLIB_GIT_REV) + string(SUBSTRING "${CMLIB_GIT_REV}" 1 7 CMLIB_GIT_REV) string(STRIP "${CMLIB_GIT_DIFF}" CMLIB_GIT_DIFF) string(STRIP "${CMLIB_GIT_TAG}" CMLIB_GIT_TAG) string(STRIP "${CMLIB_GIT_BRANCH}" CMLIB_GIT_BRANCH) From dbb57044b415e68761df59a7b2f5cee1bacc2655 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 17 Jun 2021 15:49:49 +0300 Subject: [PATCH 4/5] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hpp/cmlib_git_version.hpp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hpp/cmlib_git_version.hpp.in b/hpp/cmlib_git_version.hpp.in index bfcba46..850aa15 100644 --- a/hpp/cmlib_git_version.hpp.in +++ b/hpp/cmlib_git_version.hpp.in @@ -27,5 +27,5 @@ #define @CMLIB_PROJECT_NAME_UPPER@_GIT_TAG "@CMLIB_GIT_TAG@" #endif -#endif /* @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_GIT_VERSION_HPP_ */ +#endif /* @CMLIB_PROJECT_NAME_UPPER@_CMLIB_GIT_VERSION_HPP_ */ From 46e429bf6bb343e91e7d187b25efe72daafd7351 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Fri, 18 Jun 2021 00:56:30 +0300 Subject: [PATCH 5/5] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B8=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B3=D0=B5=D0=BD=D0=B5=D1=80=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibDocBreathe.cmake | 11 +- CMLibDocDoxygen.cmake | 7 +- doxygen/Doxyfile.in | 383 +++++++++++++++++++++++++++++++++++++ doxygen/breathe-conf.py.in | 185 ++++++++++++++++++ 4 files changed, 580 insertions(+), 6 deletions(-) create mode 100644 doxygen/Doxyfile.in create mode 100644 doxygen/breathe-conf.py.in diff --git a/CMLibDocBreathe.cmake b/CMLibDocBreathe.cmake index 4ae277b..243e21d 100644 --- a/CMLibDocBreathe.cmake +++ b/CMLibDocBreathe.cmake @@ -3,7 +3,7 @@ set_property(CACHE BREATHE_FOUND PROPERTY STRINGS ON OFF AUTO) find_package(Doxygen) find_package(Perl) -set(Python_ADDITIONAL_VERSIONS 3.8;3.7;3.6;3.5;3.4;3.3;3.2) +set(Python_ADDITIONAL_VERSIONS 3.9;3.8;3.7;3.6;3.5;3.4;3.3;3.2) find_package(PythonInterp) if(PYTHONINTERP_FOUND) find_package(Sphinx) @@ -24,7 +24,7 @@ else() set(BREATHE_FOUND OFF CACHE STRING "Breathe documentation generator disabled" FORCE) endif() -function(add_breathe target) +function(add_breathe_target target) set(options) set(oneValueArgs COMMENT) set(multiValueArgs) @@ -36,8 +36,8 @@ function(add_breathe target) set(GENERATE_XML YES) set(GENERATE_HTML NO) set(GENERATE_LATEX NO) - set(CONF_FILE ${CMAKE_SOURCE_DIR}/cmake/doc/breathe-conf.py.in) - set(DOXY_FILE ${CMAKE_SOURCE_DIR}/cmake/doc/Doxyfile.in) + set(CONF_FILE ${CMLIB_MODULE_DIR}/doxygen/breathe-conf.py.in) + set(DOXY_FILE ${CMLIB_MODULE_DIR}/doxygen/Doxyfile.in) configure_file(${CONF_FILE} ${WORK_DIR}/conf.py @ONLY) configure_file(${DOXY_FILE} ${WORK_DIR}/Doxyfile @ONLY) @@ -68,6 +68,9 @@ function(add_breathe target) ${RST_FILES} ${WORK_DIR}) endif() endif() + install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/breathe/ + COMPONENT doc OPTIONAL + DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/breathe) else() message(STATUS "CMLIB warning:") add_custom_target(${target} VERBATIM COMMENT " Breathe is not found. Skipping target ${target} build") diff --git a/CMLibDocDoxygen.cmake b/CMLibDocDoxygen.cmake index 31dcd2a..a1e2399 100644 --- a/CMLibDocDoxygen.cmake +++ b/CMLibDocDoxygen.cmake @@ -8,7 +8,7 @@ else() set(DOXYGEN_FOUND OFF CACHE STRING "Doxygen documentation generator disabled" FORCE) endif() -function(add_doxygen target) +function(add_doxygen_target target) set(options) set(oneValueArgs SQLITE LATEX HTML) set(multiValueArgs) @@ -26,7 +26,7 @@ function(add_doxygen target) endif() set(work_dir ${CMAKE_BINARY_DIR}/doc/doxygen) - configure_file(${CMAKE_SOURCE_DIR}/cmake/doc/Doxyfile.in ${work_dir}/Doxyfile @ONLY) + configure_file(${CMLIB_MODULE_DIR}/doxygen/Doxyfile.in ${work_dir}/Doxyfile @ONLY) add_custom_target( ${target} @@ -35,6 +35,9 @@ function(add_doxygen target) COMMAND ${DOXYGEN_EXECUTABLE} ${work_dir}/Doxyfile WORKING_DIRECTORY ${work_dir} COMMENT "Generating API documentation with Doxygen") + install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/doxygen/html/ + COMPONENT doc OPTIONAL + DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/doxygen) else() message(STATUS "CMLIB warning:") add_custom_target(${target} VERBATIM COMMENT " Doxygen is not found. Skipping target ${target} build") diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in new file mode 100644 index 0000000..bc6b197 --- /dev/null +++ b/doxygen/Doxyfile.in @@ -0,0 +1,383 @@ +# Doxyfile 1.8.16 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "@DOXYGEN_PROJECT_TITLE@" +PROJECT_NUMBER = +PROJECT_BRIEF = +PROJECT_LOGO = +OUTPUT_DIRECTORY = "@OUTPUT_DIRECTORY@" +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = Russian +OUTPUT_TEXT_DIRECTION = None +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = "@CMAKE_SOURCE_DIR@/src" +STRIP_FROM_INC_PATH = "@CMAKE_SOURCE_DIR@/src" +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +JAVADOC_BANNER = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = +TCL_SUBST = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +OPTIMIZE_OUTPUT_SLICE = NO +EXTENSION_MAPPING = +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 5 +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO +SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_PRIV_VIRTUAL = NO +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = YES +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO +SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = "@PROJECT_SOURCE_DIR@/src" \ + "@PROJECT_SOURCE_DIR@/doc/html" +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +CLANG_ASSISTED_PARSING = NO +CLANG_OPTIONS = +CLANG_DATABASE_PATH = +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = @GENERATE_HTML@ +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_MENUS = YES +HTML_DYNAMIC_SECTIONS = NO +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = NO +GENERATE_TREEVIEW = YES +ENUM_VALUES_PER_LINE = 4 +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = NO +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/ +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = @GENERATE_LATEX@ +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +LATEX_MAKEINDEX_CMD = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4 +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +LATEX_BIB_STYLE = plain +LATEX_TIMESTAMP = NO +LATEX_EMOJI_DIRECTORY = +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_SUBDIR = +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = @GENERATE_XML@ +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES +XML_NS_MEMB_FILE_SCOPE = NO +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +DIA_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +DOT_NUM_THREADS = 0 +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = YES +UML_LIMIT_NUM_FIELDS = 10 +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = YES +CALLER_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = YES +DOT_PATH = @DOXYGEN_DOT_PATH@ +DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES + diff --git a/doxygen/breathe-conf.py.in b/doxygen/breathe-conf.py.in new file mode 100644 index 0000000..d9c0848 --- /dev/null +++ b/doxygen/breathe-conf.py.in @@ -0,0 +1,185 @@ +#!@PYTHON_EXECUTABLE@ +# -*- coding: utf-8 -*- +# + +import os +import subprocess +import sys + +# -- General configuration ------------------------------------------------ + +# At top on conf.py (with other import statements) +import recommonmark +from recommonmark.parser import CommonMarkParser +from recommonmark.transform import AutoStructify +from recommonmark.states import DummyStateMachine +# Monkey patch to fix recommonmark 0.4 doc reference issues. +orig_run_role = DummyStateMachine.run_role +def run_role(self, name, options=None, content=None): + if name == 'doc': + name = 'any' + return orig_run_role(self, name, options, content) +DummyStateMachine.run_role = run_role + +source_parsers = { + '.md': CommonMarkParser +} + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'breathe', 'sphinx.ext.autosectionlabel', 'recommonmark' +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +source_suffix = ['.rst', '.md'] + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = '@DOXYGEN_PROJECT_TITLE@' +author = '@AUTHOR_NAME@' +copyright = '@CMLIB_YEAR@, ' + author + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '@PROJECT_VERSION@' +# The full version, including alpha/beta/rc tags. +release = '' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = ['_build', '_output', 'Thumbs.db', '.DS_Store'] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_rtd_theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = [] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + ] +} + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = '@PROJECT_NAME@doc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, '@PROJECT_NAME@.tex', '@PROJECT_NAME@ Documentation', + author, 'manual'), +] + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [(master_doc, '@PROJECT_NAME@', '@PROJECT_NAME@ Documentation', [author], 1)] + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, '@PROJECT_NAME@', '@PROJECT_NAME@ Documentation', author, '@PROJECT_NAME@', + 'One line description of project.', 'Miscellaneous'), +] + +breathe_projects = {'@PROJECT_NAME@': '@BREATHE_DOCS_BUILD_DIR@/xml'} + + +def run_doxygen(folder): + """Run the doxygen make command in the designated folder""" + + try: + retcode = subprocess.call("cd {}; doxygen".format(folder), shell=True) + if retcode < 0: + sys.stderr.write( + "doxygen terminated by signal {}".format(-retcode)) + except OSError as e: + sys.stderr.write("doxygen execution failed: {}".format(e)) + + +def setup(app): + run_doxygen('@BREATHE_DOCS_BUILD_DIR@') + app.add_config_value('recommonmark_config', { + 'enable_auto_toc_tree': True, + 'enable_eval_rst': True, + 'enable_auto_doc_ref': True, + 'enable_math': True, + 'enable_inline_math': True + }, True) + app.add_transform(AutoStructify)