diff --git a/CMakeLists.txt b/CMakeLists.txt index 3195e21e0..9631325e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,6 @@ # Project settings # #------------------------------------------------- - cmake_minimum_required(VERSION 3.13) project( MrDocs @@ -52,32 +51,166 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang$") set(MRDOCS_CLANG ON) endif() +#------------------------------------------------- +# +# Generate project headers +# +#------------------------------------------------- +# Create include/mrdocs/Version.hpp from Version.hpp.in +if (MRDOCS_REQUIRE_GIT) + find_package(Git REQUIRED) +else() + find_package(Git QUIET) +endif() +set(PROJECT_VERSION_BUILD "") +set(PROJECT_VERSION_WITH_BUILD "${PROJECT_VERSION}") # default: plain semver +if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git" AND GIT_FOUND) + # Get full SHA + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE GIT_SHA_FULL + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE GIT_SHA_FULL_RV + ERROR_QUIET + ) + if (NOT GIT_SHA_FULL_RV EQUAL 0) + message(FATAL_ERROR "Git was found but could not extract commit SHA") + endif() + set(PROJECT_VERSION_BUILD "${GIT_SHA_FULL}") + string(SUBSTRING "${GIT_SHA_FULL}" 0 12 GIT_SHA_SHORT) + + # Are we exactly at a tag? + execute_process( + COMMAND ${GIT_EXECUTABLE} describe --tags --exact-match HEAD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE GIT_EXACT_TAG + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE GIT_EXACT_TAG_RV + ERROR_QUIET + ) + if (GIT_EXACT_TAG_RV EQUAL 0) + # On a tag: canonical release + set(PROJECT_VERSION_WITH_BUILD "${PROJECT_VERSION}") + else() + # Dirty working tree? (0 = clean, 1 = dirty) + execute_process( + COMMAND ${GIT_EXECUTABLE} diff --quiet --ignore-submodules + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + RESULT_VARIABLE GIT_DIRTY_RV + ERROR_QUIET + ) + set(_dirty_suffix "") + if (GIT_DIRTY_RV EQUAL 1) + set(_dirty_suffix ".modified") + endif() + set(PROJECT_VERSION_WITH_BUILD + "${PROJECT_VERSION}+${GIT_SHA_SHORT}${_dirty_suffix}") + endif() +else() + if (MRDOCS_REQUIRE_GIT) + message(FATAL_ERROR "Git is required to extract the version build") + endif() + set(PROJECT_VERSION_BUILD "") + set(PROJECT_VERSION_WITH_BUILD "${PROJECT_VERSION}") +endif() +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/include/mrdocs/Version.hpp.in + ${CMAKE_CURRENT_BINARY_DIR}/include/mrdocs/Version.hpp + @ONLY +) + +# Create include/mrdocs/PublicSettings.hpp and related files from JSON config files +find_program(PYTHON_EXECUTABLE python3 python) +if (NOT PYTHON_EXECUTABLE) + message(FATAL_ERROR "Python is needed to configure mrdocs") +endif() +set(CONFIG_GEN_WORKING_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(CONFIG_GEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}") +set(CONFIG_GEN_CONFIG_JSON "${CMAKE_CURRENT_SOURCE_DIR}/src/lib/ConfigOptions.json") +set(CONFIG_GEN_SCRIPT_INFO "${CMAKE_CURRENT_SOURCE_DIR}/util/generate-config-info.py") +set(CONFIG_GEN_SCRIPT_SCHEMA "${CMAKE_CURRENT_SOURCE_DIR}/util/generate-yaml-schema.py") +set(CONFIG_GEN_COMMAND_INFO ${PYTHON_EXECUTABLE} ${CONFIG_GEN_SCRIPT_INFO} ${CONFIG_GEN_CONFIG_JSON} ${CONFIG_GEN_OUTPUT_DIR}) +set(CONFIG_GEN_COMMAND_SCHEMA ${PYTHON_EXECUTABLE} ${CONFIG_GEN_SCRIPT_SCHEMA}) +set(CONFIG_GEN_INPUT_FILES + ${CONFIG_GEN_SCRIPT_INFO} + ${CONFIG_GEN_CONFIG_JSON} + ${CONFIG_GEN_SCRIPT_SCHEMA} +) +set(CONFIG_GEN_OUTPUT_FILES + ${CONFIG_GEN_OUTPUT_DIR}/include/mrdocs/PublicSettings.hpp + ${CONFIG_GEN_OUTPUT_DIR}/src/lib/Lib/PublicSettings.cpp + ${CONFIG_GEN_OUTPUT_DIR}/src/tool/PublicToolArgs.hpp + ${CONFIG_GEN_OUTPUT_DIR}/src/tool/PublicToolArgs.cpp +) +if (MRDOCS_DOCUMENTATION_BUILD) + # Create the files at configure time + execute_process( + COMMAND ${CONFIG_GEN_COMMAND_INFO} + WORKING_DIRECTORY ${CONFIG_GEN_WORKING_DIR} + COMMAND_ERROR_IS_FATAL ANY + ) + execute_process( + COMMAND ${CONFIG_GEN_COMMAND_SCHEMA} + WORKING_DIRECTORY ${CONFIG_GEN_WORKING_DIR} + COMMAND_ERROR_IS_FATAL ANY + ) + set_source_files_properties(${CONFIG_GEN_OUTPUT_FILES} PROPERTIES GENERATED TRUE) +else() + # Create a custom command and target to generate the files at build time + add_custom_command( + OUTPUT ${CONFIG_GEN_OUTPUT_FILES} + COMMAND ${CONFIG_GEN_COMMAND_INFO} + COMMAND ${CONFIG_GEN_COMMAND_SCHEMA} + WORKING_DIRECTORY ${CONFIG_GEN_WORKING_DIR} + DEPENDS ${CONFIG_GEN_INPUT_FILES} + COMMENT "Generating Config Source Files" + VERBATIM + COMMAND_EXPAND_LISTS + ) +endif() + #------------------------------------------------- # # Docs build # #------------------------------------------------- if (MRDOCS_DOCUMENTATION_BUILD) - # Glob all header files - set(INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") - file(GLOB_RECURSE HEADER_FILES_LIST "${INCLUDE_DIR}/*.hpp") + # Public headers from the source tree + set(SRC_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") + file(GLOB_RECURSE SRC_HEADER_FILES "${SRC_INCLUDE_DIR}/*.hpp") + + # Public headers generated into the build tree + set(BIN_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include") + file(GLOB_RECURSE BIN_HEADER_FILES "${BIN_INCLUDE_DIR}/*.hpp") + + # Merge both sets (source + generated) + set(ALL_HEADER_FILES ${SRC_HEADER_FILES} ${BIN_HEADER_FILES}) - # Create a temporary source file that includes all header files + # Create a translation unit that includes all public headers set(TEMP_CPP_FILE "${CMAKE_CURRENT_BINARY_DIR}/all_headers.cpp") - file(WRITE ${TEMP_CPP_FILE} "// This file is generated automatically by CMake\n\n") - foreach(HEADER_FILE ${HEADER_FILES_LIST}) - file(APPEND ${TEMP_CPP_FILE} "#include \"${HEADER_FILE}\"\n") + file(WRITE "${TEMP_CPP_FILE}" "// This file is generated automatically by CMake\n\n") + + foreach(HEADER_FILE IN LISTS ALL_HEADER_FILES) + # Normalize to forward slashes so #include is portable + file(TO_CMAKE_PATH "${HEADER_FILE}" HEADER_FILE_FWD) + file(APPEND "${TEMP_CPP_FILE}" "#include \"${HEADER_FILE_FWD}\"\n") endforeach() - # Create a custom target for MrDocs - add_library(mrdocs-documentation-build STATIC ${TEMP_CPP_FILE}) + # Library just to make compilers parse the headers + add_library(mrdocs-documentation-build STATIC "${TEMP_CPP_FILE}") - # Set any other target properties here - target_include_directories(mrdocs-documentation-build PRIVATE ${INCLUDE_DIR}) - target_link_libraries(mrdocs-documentation-build PRIVATE an_external_library) + # Include dirs: source + generated + target_include_directories(mrdocs-documentation-build + PRIVATE + "${SRC_INCLUDE_DIR}" + "${BIN_INCLUDE_DIR}" + ) + + # Other defines so headers compile standalone target_compile_definitions(mrdocs-documentation-build PRIVATE MRDOCS_STATIC_LINK) - # Don't create any other targets + # No other targets in documentation builds return() endif() @@ -151,12 +284,6 @@ if (NOT DUKTAPE_FOUND) find_package(Duktape REQUIRED CONFIG) endif() -# python -find_program(PYTHON_EXECUTABLE python3 python) -if (NOT PYTHON_EXECUTABLE) - message(FATAL_ERROR "Python is needed to configure mrdocs") -endif() - unset(CMAKE_FOLDER) #------------------------------------------------- @@ -164,55 +291,6 @@ unset(CMAKE_FOLDER) # mrdocs-core # #------------------------------------------------- -# Create include/mrdocs/Version.hpp from Version.hpp.in -find_package(Git QUIET) -if (GIT_FOUND) - execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse HEAD - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - OUTPUT_VARIABLE PROJECT_VERSION_BUILD - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - # Check if PROJECT_VERSION_BUILD is populated - if (NOT PROJECT_VERSION_BUILD AND MRDOCS_REQUIRE_GIT) - message(FATAL_ERROR "Git was found but could not extract the version build") - endif() - set(PROJECT_VERSION_BUILD "${PROJECT_VERSION_BUILD}") -else() - if (MRDOCS_REQUIRE_GIT) - message(FATAL_ERROR "Git is required to extract the version build") - endif() - set(PROJECT_VERSION_BUILD "") -endif() -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/include/mrdocs/Version.hpp.in - ${CMAKE_CURRENT_BINARY_DIR}/include/mrdocs/Version.hpp - @ONLY -) - -# Config files for mrdocs-core -add_custom_command( - COMMAND - ${PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/util/generate-config-info.py - src/lib/ConfigOptions.json - ${CMAKE_CURRENT_BINARY_DIR} - COMMAND - ${PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/util/generate-yaml-schema.py - VERBATIM - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/util/generate-config-info.py - src/lib/ConfigOptions.json - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/include/mrdocs/PublicSettings.hpp - ${CMAKE_CURRENT_BINARY_DIR}/src/lib/Lib/PublicSettings.cpp - ${CMAKE_CURRENT_BINARY_DIR}/src/tool/PublicToolArgs.hpp - ${CMAKE_CURRENT_BINARY_DIR}/src/tool/PublicToolArgs.cpp - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMENT "Generating Config Source Files" -) - # Main library file( GLOB_RECURSE LIB_SOURCES CONFIGURE_DEPENDS diff --git a/bootstrap.py b/bootstrap.py index d91c1aa6f..9a2f79d5d 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -2378,13 +2378,19 @@ def generate_run_configs(self): "name": "MrDocs Build Local Docs", "script": os.path.join(mrdocs_docs_dir, f"build_local_docs.{mrdocs_docs_script_ext}"), "args": [], - "cwd": mrdocs_docs_dir + "cwd": mrdocs_docs_dir, + "env": { + "MRDOCS_ROOT": self.options.mrdocs_install_dir + } }) configs.append({ "name": "MrDocs Build Docs", "script": os.path.join(mrdocs_docs_dir, f"build_docs.{mrdocs_docs_script_ext}"), "args": [], - "cwd": mrdocs_docs_dir + "cwd": mrdocs_docs_dir, + "env": { + "MRDOCS_ROOT": self.options.mrdocs_install_dir + } }) configs.append({ "name": "MrDocs Build UI Bundle", diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml index 1ce534371..6e176b30e 100644 --- a/docs/antora-playbook.yml +++ b/docs/antora-playbook.yml @@ -40,6 +40,7 @@ antora: start_on_load: true - require: '@antora/lunr-extension' # https://gitlab.com/antora/antora-lunr-extension index_latest_only: true + - require: '@cppalliance/antora-cpp-reference-extension' asciidoc: attributes: diff --git a/docs/antora.yml b/docs/antora.yml index 513deff12..a03830e6b 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -10,3 +10,6 @@ asciidoc: table-caption: false nav: - modules/ROOT/nav.adoc +ext: + cpp-reference: + config: docs/mrdocs.yml diff --git a/docs/config-headers/README.md b/docs/config-headers/README.md deleted file mode 100644 index 2c79c7f6f..000000000 --- a/docs/config-headers/README.md +++ /dev/null @@ -1 +0,0 @@ -This directory includes a version of the configuration headers meant to be used for documentation purposes. These headers are generated by CMake when building the project, but they are not included in main header files. \ No newline at end of file diff --git a/docs/config-headers/include/mrdocs/PublicSettings.hpp b/docs/config-headers/include/mrdocs/PublicSettings.hpp deleted file mode 100644 index 007e09ac5..000000000 --- a/docs/config-headers/include/mrdocs/PublicSettings.hpp +++ /dev/null @@ -1,1871 +0,0 @@ -/* - * This file is generated automatically from the json file - * `src/lib/Lib/ConfigOptions.json`. Do not edit this file - * manually. Instead, edit the json file and run the script - * `util/generate-config-info.py` to regenerate this file. - */ - -#ifndef MRDOCS_PUBLIC_SETTINGS_HPP -#define MRDOCS_PUBLIC_SETTINGS_HPP - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace clang::mrdocs { - -struct PublicSettings { - //-------------------------------------------- - // Enums - //-------------------------------------------- - - /** Enum for "generator" options - - This enumeration value is valid for the `generator` option - - */ - enum class Generator { - Adoc, - Html, - Xml, - }; - - static - constexpr - std::string_view - toString(Generator const e) { - switch (e) { - case Generator::Adoc: - return "adoc"; - case Generator::Html: - return "html"; - case Generator::Xml: - return "xml"; - } - return ""; - } - - static - constexpr - bool - fromString(std::string_view const str, Generator& e) { - if (str == "adoc") - { - e = Generator::Adoc; - return true; - } - if (str == "html") - { - e = Generator::Html; - return true; - } - if (str == "xml") - { - e = Generator::Xml; - return true; - } - return false; - } - - /** Enum for "log-level" options - - This enumeration value is valid for the `log-level` option - - */ - enum class LogLevel { - Trace, - Debug, - Info, - Warn, - Error, - Fatal, - }; - - static - constexpr - std::string_view - toString(LogLevel const e) { - switch (e) { - case LogLevel::Trace: - return "trace"; - case LogLevel::Debug: - return "debug"; - case LogLevel::Info: - return "info"; - case LogLevel::Warn: - return "warn"; - case LogLevel::Error: - return "error"; - case LogLevel::Fatal: - return "fatal"; - } - return ""; - } - - static - constexpr - bool - fromString(std::string_view const str, LogLevel& e) { - if (str == "trace") - { - e = LogLevel::Trace; - return true; - } - if (str == "debug") - { - e = LogLevel::Debug; - return true; - } - if (str == "info") - { - e = LogLevel::Info; - return true; - } - if (str == "warn") - { - e = LogLevel::Warn; - return true; - } - if (str == "error") - { - e = LogLevel::Error; - return true; - } - if (str == "fatal") - { - e = LogLevel::Fatal; - return true; - } - return false; - } - - /** Enum for "base-member-inheritance" options - - This enumeration value is valid for the `inherit-base-members` option - - */ - enum class BaseMemberInheritance { - Never, - Reference, - CopyDependencies, - CopyAll, - }; - - static - constexpr - std::string_view - toString(BaseMemberInheritance const e) { - switch (e) { - case BaseMemberInheritance::Never: - return "never"; - case BaseMemberInheritance::Reference: - return "reference"; - case BaseMemberInheritance::CopyDependencies: - return "copy-dependencies"; - case BaseMemberInheritance::CopyAll: - return "copy-all"; - } - return ""; - } - - static - constexpr - bool - fromString(std::string_view const str, BaseMemberInheritance& e) { - if (str == "never") - { - e = BaseMemberInheritance::Never; - return true; - } - if (str == "reference") - { - e = BaseMemberInheritance::Reference; - return true; - } - if (str == "copy-dependencies") - { - e = BaseMemberInheritance::CopyDependencies; - return true; - } - if (str == "copy-all") - { - e = BaseMemberInheritance::CopyAll; - return true; - } - return false; - } - - /** Enum for "sort-symbol-by" options - - These enumeration values are valid for the following options: - - - sort-members-by - - sort-namespace-members-by - - */ - enum class SortSymbolBy { - Name, - Location, - }; - - static - constexpr - std::string_view - toString(SortSymbolBy const e) { - switch (e) { - case SortSymbolBy::Name: - return "name"; - case SortSymbolBy::Location: - return "location"; - } - return ""; - } - - static - constexpr - bool - fromString(std::string_view const str, SortSymbolBy& e) { - if (str == "name") - { - e = SortSymbolBy::Name; - return true; - } - if (str == "location") - { - e = SortSymbolBy::Location; - return true; - } - return false; - } - - //-------------------------------------------- - // Command Line Options - // - // Options that can only be provided via the command line - //-------------------------------------------- - - /** Configuration or compilation database files - - The inputs are configuration files or compilation database files that - used to generate the documentation. - - When the input ends with `mrdocs.yml`, it is interpreted as a - configuration file, the file is read and the options are used to - generate the documentation as if it was provided to the `config` - option. - - When the input ends with `compilation_database.json` or - `CMakeLists.txt`, it is interpreted as a compilation database file, - the file is read and the compiler flags are used to generate the - documentation as if it was provided to the `compilation-database` - option. - */ - std::vector cmdLineInputs; - - /** Mr.Docs configuration file - - The configuration file is a YAML file that contains the options used - to generate the documentation. - - The configuration file is read and the options are used to generate - the documentation. - - The configuration file can be used to specify the source code, the - output directory, the compilation database, the generator, and the - filters. - */ - std::string config; - - //-------------------------------------------- - // Paths - // - // Paths to the source code and output directories - //-------------------------------------------- - - /** Path to the root directory of the source code - - Path to the root directory of the source code. - - This path is used as a default for input files and a base for relative - paths formed from absolute paths. - - This should typically be the root directory of the git project, as - relative paths formed from it can be used to create links to these - source files in the repository. - - Templates use the `base-url` option to create links to the source - code. - */ - std::string sourceRoot; - - /** Directory or file for generating output - - Multipage generators expect a directory. - - Single page generators expect a file or a directory where the file - will be created. - - If the directory does not exist, it will be created. - */ - std::string output; - - /** Path to the compilation database - - Path to the compilation database or a build script to generate it. - - The compilation database is a JSON file that contains the compiler - commands used to build the source code. - - The compilation database is used to extract the compiler flags and the - source files used to build the source code and extract symbols. - - This option also accepts the path to a build script such as - CMakeLists.txt to be used to generate the compilation database. - - In this case, Mr.Docs will look for CMake in `PATH` or in `CMAKE_ROOT` - and run the script to generate the compilation database file. - */ - std::string compilationDatabase; - - //-------------------------------------------- - // Filters - // - // Filters to include or exclude files and symbols from the documentation - //-------------------------------------------- - - /** Input directories to extract symbols from - - Input directories to extract. - - Only symbols defined in files in these directories are extracted. - - The paths are relative to the mrdocs configuration file. - */ - std::vector input; - - /** Recursively include files from "input" paths - - Recursively include files. - - When set to true, Mr.Docs includes files in subdirectories of the - input directories. - - When set to false, Mr.Docs includes only the files in the input - directories. - */ - bool recursive = true; - - /** File patterns to include - - File patterns to include. - - Only the files that match these patterns are extracted. - - The patterns are relative to the input directories. - */ - std::vector filePatterns; - - /** Input directories to exclude - - Symbols defined in files in these directories are not extracted even - if they are in the list of include directories. - - When relative, the paths are relative to the directory of the mrdocs - configuration file. - - For instance, "include/experimental" will exclude all files in the - directory `/include/experimental`. - */ - std::vector exclude; - - /** File patterns to exclude - - File patterns to exclude. - - Files that match these patterns are not extracted even if they are in - the list of include directories. - - The patterns are relative to the configuration file. - - A single * will match all files in the directory. - - Double ** will match all files in the directory and its - subdirectories. - */ - std::vector excludePatterns; - - /** Symbol patterns to include - - If any patterns are defined here, only symbols that match one of these - patterns are extracted. - - The patterns are applied to the fully qualified name of the symbol - without any leading "::". - - A single "*" will match all symbols in the namespace. - - Double "**" will match all symbols in the namespace and its - subnamespaces. - - The patterns also support "?" for any chars, "[]" for charsets, - "[^]" for inverted charsets, and "{,...}" for - alternatives. - */ - std::vector includeSymbols; - - /** Symbol patterns to exclude - - A symbol that matches one of these patterns is not extracted even if - whitelisted by "include-symbols". - - See the documentation for "include-symbols" for the pattern syntax. - */ - std::vector excludeSymbols; - - /** Exposition only symbols rendered as "see-below". - - Symbols that match one of these filters are tagged as "see-below" in - the documentation, and so do symbols in scopes tagged as "see-below". - - This option is used to remove details about symbols that are - considered part of the private API of the project but the user might - need to interact with. - - In the documentation page for this symbol, the symbol is exposition - only: the synopsis of the implementation is rendered as "see-below" - and members of scopes (such as a namespace or record) are not listed. - - The rest of the documentation is rendered as usual to explain the - symbol. - - See the documentation for "include-symbol" for the pattern syntax. - */ - std::vector seeBelow; - - /** Symbols rendered as "implementation-defined" - - Symbols that match one of these filters are tagged as - "implementation-defined" in the documentation, and so do symbols in - scopes tagged as "implementation-defined". - - This option is used to exclude symbols from the documentation that are - considered part of the private API of the project. - - An "implementation-defined" symbol has no documentation page in the - output. - - If any other symbol refers to it, the reference is rendered as - "implementation-defined". - - See the documentation for "include-symbol" for the pattern syntax. - */ - std::vector implementationDefined; - - //-------------------------------------------- - // Semantic Parsing - // - // Options to control how the source code is parsed - //-------------------------------------------- - - /** Include path prefixes allowed to be missing - - Specifies path prefixes for include files that, if missing, will not - cause documentation generation to fail. - - Missing files with these prefixes are served as empty files from an - in-memory file system, allowing processing to continue. - - For example, use "llvm/" to forgive all includes from LLVM. - - If any such path is specified, MrDocs will attempt to synthesize - missing included types. - - Only simple sets of non-conflicting inferred types can be synthesized. - - For more complex types or for better control, provide a shim using the - "missing-include-shims" option. - */ - std::vector missingIncludePrefixes; - - /** Shims for forgiven missing include files - - Specifies a map of include file paths to shim contents. - - If a missing include file matches a forgiven prefix, MrDocs will use - the shim content from this map as the file contents. - - If no shim is provided for a forgiven file, an empty file is used by - default. - */ - std::map missingIncludeShims; - - //-------------------------------------------- - // Comment Parsing - // - // Options to control how comments are parsed - //-------------------------------------------- - - /** Use the first line of the comment as the brief - - When set to `true`, Mr.Docs uses the first line (until the first dot, - question mark, or exclamation mark) of the comment as the brief of the - symbol. - - When set to `false`, a explicit @brief command is required. - */ - bool autoBrief = true; - - /** Automatically find non-member functions - - When set to `true`, Mr.Docs automatically finds non-member functions - that are related to the current class. - */ - bool autoRelates = true; - - /** Automatically provide missing documentation for special functions - and trivial metadata - - When set to `true`, Mr.Docs automatically provides documentation for - special functions, such as constructors, destructors, and operators. - - It also provides documentation for missing documentation metadata, - such as known types. - */ - bool autoFunctionMetadata = true; - - //-------------------------------------------- - // Metadata Extraction - // - // Metadata and C++ semantic constructs to extract - //-------------------------------------------- - - /** Extract all symbols - - When set to `true`, MrDocs extracts all symbols from the source code, - even if no documentation is provided. - - MrDocs can only identify whether a symbol is ultimated documented - after extracting information from all translation units. - - For this reason, when this option is set to `false`, it's still - recommendable to provide file and symbol filters so that only the - desired symbols are traversed and stored by MrDocs. - */ - bool extractAll = true; - - /** Extraction policy for private class members - - Determine whether private class members should be extracted - */ - bool extractPrivate = false; - - /** Extraction policy for private virtual methods of a class - - Determine whether private virtual methods of a class should be - extracted - */ - bool extractPrivateVirtual = false; - - /** Extraction policy for private base classes - - Determine whether private base classes should be extracted - */ - bool extractPrivateBases = false; - - /** Extraction policy for static members of a file - - Determine whether static members of a file should be extracted. - - This option does not refer to static members of a class. - */ - bool extractStatic = false; - - /** Extraction policy for records defined locally in source files - - Determine whether records only defined locally in source files should - be extracted. - */ - bool extractLocalClasses = true; - - /** Extraction policy for anonymous namespaces - - Determine whether symbols in anonymous namespaces should be extracted. - */ - bool extractAnonymousNamespaces = true; - - /** Extraction policy for empty namespaces - - Determine whether empty namespaces without documentation should be - extracted. - */ - bool extractEmptyNamespaces = false; - - /** Determine how derived classes inherit base members - - Determine how derived classes inherit members of base classes. - - When set to `never`, derived classes do not inherit members of base - classes and only the relationship is stored. - - When set to `reference`, derived classes list members of base classes - but references are still linked to the base class. - - When set to `copy-dependencies`, a reference is created by default and - a copy is created when the base class is a dependency. - - When set to `copy-all`, a copy is created for each base symbol as if - it was declared in the derived class. - - If the base class is a dependency, the extraction mode is copied from - the new parent. - */ - BaseMemberInheritance inheritBaseMembers = BaseMemberInheritance::CopyDependencies; - - /** Implicit template specializations used as base classes are - extracted as dependencies - - When set to `true`, MrDocs extracts implicit template specializations - used as base classes as dependencies. - - This allows MrDocs to extract metadata that can later be used to - determine the members of the derived class, as specified by the - `inherit-base-members` option. - */ - bool extractImplicitSpecializations = true; - - /** Extraction policy for friend functions and classes - - Determine whether friend functions and classes should be extracted. - - When set to `true`, MrDocs extracts friend functions and classes. - - When set to `false`, friend functions and classes are not extracted. - */ - bool extractFriends = true; - - /** Sort the members of a record - - When set to `true`, sort the members of a record by the criterion - determined in the `sort-members-by` option. - - When set to `false`, the members are included in the declaration order - they are extracted. - */ - bool sortMembers = true; - - /** Determine how members of a record are sorted - - If `sort-members` is set to `true`, determine how members of a record - are sorted. - - When set to `name`, members are sorted by name. - - When set to `location`, members are sorted by their primary location - in the source code, considering the short name of the path and the - location in the file. - */ - SortSymbolBy sortMembersBy = SortSymbolBy::Name; - - /** Determine how members of a namespace are sorted - - Although members of namespaces are always sorted, determine how - members of a namespace are sorted. - - When set to `name`, members are sorted by name. - - When set to `location`, members are sorted by their primary location - in the source code, considering the short name of the path and the - location in the file. - */ - SortSymbolBy sortNamespaceMembersBy = SortSymbolBy::Name; - - /** Sort constructors first - - When set to `true`, constructors are sorted first in the list of - members of a record. - */ - bool sortMembersCtors1St = true; - - /** Sort destructors first - - When set to `true`, destructors are sorted first in the list of - members of a record. - */ - bool sortMembersDtors1St = true; - - /** Sort assignment operators first - - When set to `true`, assignment operators are sorted first in the list - of members of a record. - */ - bool sortMembersAssignment1St = true; - - /** Sort conversion operators last - - When set to `true`, conversion operators are sorted last in the list - of members of a record or namespace. - */ - bool sortMembersConversionLast = true; - - /** Sort relational operators last - - When set to `true`, relational operators are sorted last in the list - of members of a record or namespace. - */ - bool sortMembersRelationalLast = true; - - //-------------------------------------------- - // Semantic Constructs - // - // C++ semantic constructs to extract - //-------------------------------------------- - - /** Detect and reduce SFINAE expressions - - When set to true, MrDocs detects SFINAE expressions in the source code - and extracts them as part of the documentation. - - Expressions such as `std::enable_if<...>` are detected, removed, and - documented as a requirement. - - MrDocs uses an algorithm that extracts SFINAE infomation from types by - identifying inspecting the primary template and specializations to - detect the result type and the controlling expressions in a - specialization. - */ - bool sfinae = true; - - /** Detect and group function overloads - - When set to `true`, MrDocs detects function overloads and groups them - as a single symbol type. - - The documentation for this new symbol comes from the union of - non-ambiguous metadata from the functions. - */ - bool overloads = true; - - //-------------------------------------------- - // Generators - // - // Generators to create the documentation and their options - //-------------------------------------------- - - /** Generator used to create the documentation - - The generator is responsible for creating the documentation from the - extracted symbols. - - The generator uses the extracted symbols and the templates to create - the documentation. - - The generator can create different types of documentation such as - HTML, XML, and AsciiDoc. - */ - Generator generator = Generator::Adoc; - - /** Generate a multipage documentation - - Generates a multipage documentation. - - The output directory must be a directory. - - This option acts as a hint to the generator to create a multipage - documentation. - - Whether the hint is followed or not depends on the generator. - */ - bool multipage = true; - - /** Base URL for links to source code - - Base URL for links to source code. - - The base URL is used to create links to the source code in the - documentation. - - The base URL is combined with the path to the source file to create - the link. - */ - std::string baseUrl; - - /** Path to the Addons directory - - Path to the Addons directory. - - The Addons directory contains the template files used by generators to - create the documentation. - - When a custom Addons directory is not specified, the default templates - are used. - - The default templates are located at the `share/mrdocs/addons` - directory of the MrDocs installation. - - Users can create custom templates by copying the default templates to - a custom directory and specifying the custom directory using this - option. - */ - std::string addons; - - /** Path for the tagfile - - Specifies the full path (filename) where the generated tagfile should - be saved. - - If left empty, no tagfile will be generated. - */ - std::string tagfile; - - /** Use legible names - - Use legible names for ids in the documentation. - - When set to true, MrDocs uses legible names for symbols in the - documentation. - - These are symbols that are legible but still safe for URLs. - - When the option is set to false, MrDocs uses a hash of the symbol ID. - */ - bool legibleNames = true; - - /** Output an embeddable document - - Output an embeddable document, which excludes the header, the footer, - and everything outside the body of the document. - - This option is useful for producing documents that can be inserted - into an external template. - */ - bool embedded = false; - - /** Show namespace pages in the documentation - - When set to true, MrDocs creates a page for each namespace in the - documentation. - */ - bool showNamespaces = true; - - /** Use the global namespace page as an index for all symbols - - When set to true, the page for the global namespace will recursively - list all symbols in the documentation, not just those in the global - namespace. - - This makes the global namespace page act as an index for the entire - project. - */ - bool globalNamespaceIndex = true; - - //-------------------------------------------- - // Build options - // - // Options for building the source code - //-------------------------------------------- - - /** CMake arguments when generating the compilation database from - CMakeLists.txt - - When the compilation-database option is a CMakeLists.txt file, these - arguments are passed to the cmake command to generate the - compilation_database.json. - */ - std::string cmake; - - /** Additional defines passed to the compiler - - Additional defines passed to the compiler when building the source - code. - - These defines are added to the compilation database regardless of the - strategy to generate it. - */ - std::vector defines; - - /** Use the system C++ standard library - - To achieve reproducible results, MrDocs bundles the LibC++ headers. - - To use the C++ standard library available in the system instead, set - this option to true. - */ - bool useSystemStdlib = false; - - /** C++ Standard Library include paths - - When `use-system-stdlib` is disabled, the C++ standard library headers - are available in these paths. - */ - std::vector stdlibIncludes; - - /** Use the system C standard library - - To achieve reproducible results, MrDocs bundles the LibC headers with - its definitions. - - To use the C standard library available in the system instead, set - this option to true. - */ - bool useSystemLibc = false; - - /** Standard Library include paths - - When `use-system-libc` is disabled, the C standard library headers are - available in these paths. - */ - std::vector libcIncludes; - - /** System include paths - - System include paths. - - These paths are used to add directories to the system include search - path. - - The system include search path is used to search for system headers. - - The system headers are headers that are provided by the system and are - not part of the project. - - The system headers are used to provide the standard library headers - and other system headers. - - The system headers are not part of the project and are not checked for - warnings and errors. - */ - std::vector systemIncludes; - - /** Include paths - - Include paths. - - These paths are used to add directories to the include search path. - - The include search path is used to search for headers. - - The headers are used to provide declarations and definitions of - symbols. - - The headers are part of the project and are checked for warnings and - errors. - */ - std::vector includes; - - //-------------------------------------------- - // Warnings - // - // Warnings and progress messages - //-------------------------------------------- - - /** Verbose output - - Verbose output. - - When set to true, MrDocs outputs additional information during the - generation of the documentation. - */ - bool verbose = false; - - /** The minimum reporting level - - The reporting level determines the amount of information displayed - during the generation of the documentation. - - The value `-1` delegates the decision to the `log-level` option. - */ - unsigned report = -1; - - /** The minimum reporting level - - The reporting level determines the amount of information displayed - during the generation of the documentation. - */ - LogLevel logLevel = LogLevel::Info; - - /** Enable warning messages - - When set to `true`, MrDocs outputs warning messages during the - generation of the documentation. - - It is usually recommended to enable warnings while writing the - documentation. - */ - bool warnings = true; - - /** Warn if symbols are not documented - - When set to `true`, MrDocs outputs a warning message if a symbol that - passes all filters is not documented. - */ - bool warnIfUndocumented = true; - - /** Warn if documentation has errors - - When set to `true`, MrDocs outputs a warning message if the - documentation of a symbol has errors such as duplicate parameters and - parameters that don't exist. - */ - bool warnIfDocError = true; - - /** Warn if parameters are not documented - - When set to `true`, MrDocs outputs a warning message if a named - function parameter is not documented. - */ - bool warnNoParamdoc = true; - - /** Warn if documented functions have unnamed parameters - - When set to `true`, MrDocs outputs a warning message if a documented - function has a parameter that is not named. - */ - bool warnUnnamedParam = false; - - /** Warn if enum values are not documented - - When set to `true`, MrDocs outputs a warning message if an enum value - is not documented. - */ - bool warnIfUndocEnumVal = true; - - /** Warn if a documentation reference is broken - - When set to `true`, MrDocs outputs a warning message if a reference in - the documentation is broken. - */ - bool warnBrokenRef = true; - - /** Treat warnings as errors - - When set to `true`, MrDocs treats warnings as errors and stops the - generation of the documentation. - */ - bool warnAsError = false; - - //-------------------------------------------- - // Miscellaneous - // - // Miscellaneous options - //-------------------------------------------- - - /** Number of threads to use - - The desired level of concurrency: 0 for hardware-suggested. - */ - unsigned concurrency = 0; - - /** Continue if files are not mapped correctly - - When set to true, MrDocs continues to generate the documentation even - if some files are not mapped correctly. - - Files are not mapped correctly when the source file is not found or - the compilation database does not contain the compiler flags for the - source file. - */ - bool ignoreMapErrors = false; - - /** Whether AST visitation failures should not stop the program - - When set to true, MrDocs continues to generate the documentation even - if there are AST visitation failures. - - AST visitation failures occur when the source code contains constructs - that are not supported by MrDocs. - */ - bool ignoreFailures = false; - - /** Load the configuration from a YAML string - - This function loads the values from the YAML string without - normalizing or validating them. - - After calling this function, call `normalize` to normalize - and validate the options. - - @param s The PublicSettings object to load the configuration into - @param configYaml The YAML string with the configuration - @return Expected with the error if any - */ - static - Expected - load( - PublicSettings &s, - std::string_view configYaml); - - /** Option Type - */ - enum class OptionType { - Enum, - Path, - ListSymbolGlob, - ListPath, - String, - Unsigned, - FilePath, - ListPathGlob, - DirPath, - ListString, - Bool, - MapStringString, - }; - - /** Option validation traits - */ - struct OptionProperties { - OptionType type = OptionType::String; - bool required = false; - bool commandLineSink = false; - bool commandLineOnly = false; - bool mustExist = true; - bool shouldExist = false; - std::optional minValue = std::nullopt; - std::optional maxValue = std::nullopt; - std::optional> filenameMapping = std::nullopt; - std::variant< - std::monostate, - LogLevel, - BaseMemberInheritance, - std::vector, - unsigned, - Generator, - std::map, - SortSymbolBy, - std::vector, - bool, - std::vector, - std::string> defaultValue = std::monostate(); - std::string relativeTo = {}; - std::optional deprecated = std::nullopt; - }; - - /** Normalize the configuration values with a visitor - - This function normalizes and validates the configuration values. - - @param dirs The reference directories to resolve paths - @param f The visitor - @return Expected with the error if any - */ - template - Expected - normalize( - ReferenceDirectories const& dirs, - F&& f) - { - // Configuration or compilation database files - MRDOCS_TRY(std::forward(f)(*this, "cmd-line-inputs", cmdLineInputs, dirs, OptionProperties{ - .type = OptionType::ListPath, - .required = false, - .commandLineSink = true, - .commandLineOnly = true, - .mustExist = true, - .shouldExist = true, - .filenameMapping = std::map{ - { "mrdocs.yml", "config" }, - { "compile_commands.json", "compilation-database" }, - { "CMakeLists.txt", "compilation-database" }, - }, - .relativeTo = "", - })); - // Mr.Docs configuration file - MRDOCS_TRY(std::forward(f)(*this, "config", config, dirs, OptionProperties{ - .type = OptionType::FilePath, - .required = true, - .commandLineOnly = true, - .mustExist = true, - .shouldExist = false, - .defaultValue = std::string("/mrdocs.yml"), - .relativeTo = "", - })); - // Path to the root directory of the source code - MRDOCS_TRY(std::forward(f)(*this, "source-root", sourceRoot, dirs, OptionProperties{ - .type = OptionType::DirPath, - .required = false, - .mustExist = true, - .shouldExist = false, - .defaultValue = std::string(""), - .relativeTo = "", - })); - // Directory or file for generating output - MRDOCS_TRY(std::forward(f)(*this, "output", output, dirs, OptionProperties{ - .type = OptionType::Path, - .required = false, - .mustExist = false, - .shouldExist = false, - .defaultValue = std::string("/reference-output"), - .relativeTo = "", - })); - // Path to the compilation database - MRDOCS_TRY(std::forward(f)(*this, "compilation-database", compilationDatabase, dirs, OptionProperties{ - .type = OptionType::FilePath, - .required = false, - .mustExist = true, - .shouldExist = false, - .relativeTo = "", - })); - // Input directories to extract symbols from - MRDOCS_TRY(std::forward(f)(*this, "input", input, dirs, OptionProperties{ - .type = OptionType::ListPath, - .required = false, - .mustExist = false, - .shouldExist = true, - .defaultValue = std::vector({"/."}), - .relativeTo = "", - })); - // Recursively include files from "input" paths - MRDOCS_TRY(std::forward(f)(*this, "recursive", recursive, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // File patterns to include - MRDOCS_TRY(std::forward(f)(*this, "file-patterns", filePatterns, dirs, OptionProperties{ - .type = OptionType::ListPathGlob, - .required = false, - .defaultValue = std::vector({PathGlobPattern::create("*.hpp").value(), PathGlobPattern::create("*.h").value(), PathGlobPattern::create("*.hh").value(), PathGlobPattern::create("*.ipp").value(), PathGlobPattern::create("*.inc").value(), PathGlobPattern::create("*.cpp").value(), PathGlobPattern::create("*.cc").value(), PathGlobPattern::create("*.cxx").value(), PathGlobPattern::create("*.c").value(), PathGlobPattern::create("*.hxx").value()}), - })); - // Input directories to exclude - MRDOCS_TRY(std::forward(f)(*this, "exclude", exclude, dirs, OptionProperties{ - .type = OptionType::ListPath, - .required = false, - .mustExist = false, - .shouldExist = true, - .relativeTo = "", - })); - // File patterns to exclude - MRDOCS_TRY(std::forward(f)(*this, "exclude-patterns", excludePatterns, dirs, OptionProperties{ - .type = OptionType::ListPathGlob, - .required = false, - .relativeTo = "", - })); - // Symbol patterns to include - MRDOCS_TRY(std::forward(f)(*this, "include-symbols", includeSymbols, dirs, OptionProperties{ - .type = OptionType::ListSymbolGlob, - .required = false, - .relativeTo = "", - })); - // Symbol patterns to exclude - MRDOCS_TRY(std::forward(f)(*this, "exclude-symbols", excludeSymbols, dirs, OptionProperties{ - .type = OptionType::ListSymbolGlob, - .required = false, - })); - // Exposition only symbols rendered as "see-below". - MRDOCS_TRY(std::forward(f)(*this, "see-below", seeBelow, dirs, OptionProperties{ - .type = OptionType::ListSymbolGlob, - .required = false, - })); - // Symbols rendered as "implementation-defined" - MRDOCS_TRY(std::forward(f)(*this, "implementation-defined", implementationDefined, dirs, OptionProperties{ - .type = OptionType::ListSymbolGlob, - .required = false, - })); - // Include path prefixes allowed to be missing - MRDOCS_TRY(std::forward(f)(*this, "missing-include-prefixes", missingIncludePrefixes, dirs, OptionProperties{ - .type = OptionType::ListString, - .required = false, - })); - // Shims for forgiven missing include files - MRDOCS_TRY(std::forward(f)(*this, "missing-include-shims", missingIncludeShims, dirs, OptionProperties{ - .type = OptionType::MapStringString, - .required = false, - })); - // Use the first line of the comment as the brief - MRDOCS_TRY(std::forward(f)(*this, "auto-brief", autoBrief, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Automatically find non-member functions - MRDOCS_TRY(std::forward(f)(*this, "auto-relates", autoRelates, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Automatically provide missing documentation for special functions and trivial metadata - MRDOCS_TRY(std::forward(f)(*this, "auto-function-metadata", autoFunctionMetadata, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Extract all symbols - MRDOCS_TRY(std::forward(f)(*this, "extract-all", extractAll, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Extraction policy for private class members - MRDOCS_TRY(std::forward(f)(*this, "extract-private", extractPrivate, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Extraction policy for private virtual methods of a class - MRDOCS_TRY(std::forward(f)(*this, "extract-private-virtual", extractPrivateVirtual, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Extraction policy for private base classes - MRDOCS_TRY(std::forward(f)(*this, "extract-private-bases", extractPrivateBases, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Extraction policy for static members of a file - MRDOCS_TRY(std::forward(f)(*this, "extract-static", extractStatic, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Extraction policy for records defined locally in source files - MRDOCS_TRY(std::forward(f)(*this, "extract-local-classes", extractLocalClasses, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Extraction policy for anonymous namespaces - MRDOCS_TRY(std::forward(f)(*this, "extract-anonymous-namespaces", extractAnonymousNamespaces, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Extraction policy for empty namespaces - MRDOCS_TRY(std::forward(f)(*this, "extract-empty-namespaces", extractEmptyNamespaces, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Determine how derived classes inherit base members - MRDOCS_TRY(std::forward(f)(*this, "inherit-base-members", inheritBaseMembers, dirs, OptionProperties{ - .type = OptionType::Enum, - .required = false, - .defaultValue = BaseMemberInheritance(BaseMemberInheritance::CopyDependencies), - })); - // Implicit template specializations used as base classes are extracted as dependencies - MRDOCS_TRY(std::forward(f)(*this, "extract-implicit-specializations", extractImplicitSpecializations, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Extraction policy for friend functions and classes - MRDOCS_TRY(std::forward(f)(*this, "extract-friends", extractFriends, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Sort the members of a record - MRDOCS_TRY(std::forward(f)(*this, "sort-members", sortMembers, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Determine how members of a record are sorted - MRDOCS_TRY(std::forward(f)(*this, "sort-members-by", sortMembersBy, dirs, OptionProperties{ - .type = OptionType::Enum, - .required = false, - .defaultValue = SortSymbolBy(SortSymbolBy::Name), - })); - // Determine how members of a namespace are sorted - MRDOCS_TRY(std::forward(f)(*this, "sort-namespace-members-by", sortNamespaceMembersBy, dirs, OptionProperties{ - .type = OptionType::Enum, - .required = false, - .defaultValue = SortSymbolBy(SortSymbolBy::Name), - })); - // Sort constructors first - MRDOCS_TRY(std::forward(f)(*this, "sort-members-ctors-1st", sortMembersCtors1St, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Sort destructors first - MRDOCS_TRY(std::forward(f)(*this, "sort-members-dtors-1st", sortMembersDtors1St, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Sort assignment operators first - MRDOCS_TRY(std::forward(f)(*this, "sort-members-assignment-1st", sortMembersAssignment1St, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Sort conversion operators last - MRDOCS_TRY(std::forward(f)(*this, "sort-members-conversion-last", sortMembersConversionLast, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Sort relational operators last - MRDOCS_TRY(std::forward(f)(*this, "sort-members-relational-last", sortMembersRelationalLast, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Detect and reduce SFINAE expressions - MRDOCS_TRY(std::forward(f)(*this, "sfinae", sfinae, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Detect and group function overloads - MRDOCS_TRY(std::forward(f)(*this, "overloads", overloads, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Generator used to create the documentation - MRDOCS_TRY(std::forward(f)(*this, "generator", generator, dirs, OptionProperties{ - .type = OptionType::Enum, - .required = false, - .defaultValue = Generator(Generator::Adoc), - })); - // Generate a multipage documentation - MRDOCS_TRY(std::forward(f)(*this, "multipage", multipage, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Base URL for links to source code - MRDOCS_TRY(std::forward(f)(*this, "base-url", baseUrl, dirs, OptionProperties{ - .type = OptionType::String, - .required = false, - })); - // Path to the Addons directory - MRDOCS_TRY(std::forward(f)(*this, "addons", addons, dirs, OptionProperties{ - .type = OptionType::Path, - .required = false, - .mustExist = true, - .shouldExist = false, - .defaultValue = std::string("/share/mrdocs/addons"), - .relativeTo = "", - })); - // Path for the tagfile - MRDOCS_TRY(std::forward(f)(*this, "tagfile", tagfile, dirs, OptionProperties{ - .type = OptionType::FilePath, - .required = false, - .mustExist = false, - .shouldExist = false, - .defaultValue = std::string("/reference.tag.xml"), - .relativeTo = "", - })); - // Use legible names - MRDOCS_TRY(std::forward(f)(*this, "legible-names", legibleNames, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Output an embeddable document - MRDOCS_TRY(std::forward(f)(*this, "embedded", embedded, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Show namespace pages in the documentation - MRDOCS_TRY(std::forward(f)(*this, "show-namespaces", showNamespaces, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Use the global namespace page as an index for all symbols - MRDOCS_TRY(std::forward(f)(*this, "global-namespace-index", globalNamespaceIndex, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // CMake arguments when generating the compilation database from CMakeLists.txt - MRDOCS_TRY(std::forward(f)(*this, "cmake", cmake, dirs, OptionProperties{ - .type = OptionType::String, - .required = false, - })); - // Additional defines passed to the compiler - MRDOCS_TRY(std::forward(f)(*this, "defines", defines, dirs, OptionProperties{ - .type = OptionType::ListString, - .required = false, - })); - // Use the system C++ standard library - MRDOCS_TRY(std::forward(f)(*this, "use-system-stdlib", useSystemStdlib, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // C++ Standard Library include paths - MRDOCS_TRY(std::forward(f)(*this, "stdlib-includes", stdlibIncludes, dirs, OptionProperties{ - .type = OptionType::ListPath, - .required = false, - .mustExist = false, - .shouldExist = true, - .defaultValue = std::vector({"/share/mrdocs/headers/libcxx", "/share/mrdocs/headers/clang"}), - .relativeTo = "", - })); - // Use the system C standard library - MRDOCS_TRY(std::forward(f)(*this, "use-system-libc", useSystemLibc, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Standard Library include paths - MRDOCS_TRY(std::forward(f)(*this, "libc-includes", libcIncludes, dirs, OptionProperties{ - .type = OptionType::ListPath, - .required = false, - .mustExist = false, - .shouldExist = true, - .defaultValue = std::vector({"/share/mrdocs/headers/libc-stubs"}), - .relativeTo = "", - })); - // System include paths - MRDOCS_TRY(std::forward(f)(*this, "system-includes", systemIncludes, dirs, OptionProperties{ - .type = OptionType::ListPath, - .required = false, - .mustExist = false, - .shouldExist = true, - .relativeTo = "", - })); - // Include paths - MRDOCS_TRY(std::forward(f)(*this, "includes", includes, dirs, OptionProperties{ - .type = OptionType::ListPath, - .required = false, - .mustExist = false, - .shouldExist = true, - .relativeTo = "", - })); - // Verbose output - MRDOCS_TRY(std::forward(f)(*this, "verbose", verbose, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // The minimum reporting level - MRDOCS_TRY(std::forward(f)(*this, "report", report, dirs, OptionProperties{ - .type = OptionType::Unsigned, - .required = false, - .defaultValue = static_cast(-1), - .deprecated = "Use `log-level` instead", - })); - // The minimum reporting level - MRDOCS_TRY(std::forward(f)(*this, "log-level", logLevel, dirs, OptionProperties{ - .type = OptionType::Enum, - .required = false, - .defaultValue = LogLevel(LogLevel::Info), - })); - // Enable warning messages - MRDOCS_TRY(std::forward(f)(*this, "warnings", warnings, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Warn if symbols are not documented - MRDOCS_TRY(std::forward(f)(*this, "warn-if-undocumented", warnIfUndocumented, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Warn if documentation has errors - MRDOCS_TRY(std::forward(f)(*this, "warn-if-doc-error", warnIfDocError, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Warn if parameters are not documented - MRDOCS_TRY(std::forward(f)(*this, "warn-no-paramdoc", warnNoParamdoc, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Warn if documented functions have unnamed parameters - MRDOCS_TRY(std::forward(f)(*this, "warn-unnamed-param", warnUnnamedParam, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Warn if enum values are not documented - MRDOCS_TRY(std::forward(f)(*this, "warn-if-undoc-enum-val", warnIfUndocEnumVal, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Warn if a documentation reference is broken - MRDOCS_TRY(std::forward(f)(*this, "warn-broken-ref", warnBrokenRef, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(true), - })); - // Treat warnings as errors - MRDOCS_TRY(std::forward(f)(*this, "warn-as-error", warnAsError, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Number of threads to use - MRDOCS_TRY(std::forward(f)(*this, "concurrency", concurrency, dirs, OptionProperties{ - .type = OptionType::Unsigned, - .required = false, - .commandLineOnly = true, - .defaultValue = static_cast(0), - })); - // Continue if files are not mapped correctly - MRDOCS_TRY(std::forward(f)(*this, "ignore-map-errors", ignoreMapErrors, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - // Whether AST visitation failures should not stop the program - MRDOCS_TRY(std::forward(f)(*this, "ignore-failures", ignoreFailures, dirs, OptionProperties{ - .type = OptionType::Bool, - .required = false, - .defaultValue = static_cast(false), - })); - return {}; - } - - /** Visit all options - - @param f The visitor - */ - template - void - visit(F&& f) - { - std::forward(f)("cmd-line-inputs", cmdLineInputs); - std::forward(f)("config", config); - std::forward(f)("source-root", sourceRoot); - std::forward(f)("output", output); - std::forward(f)("compilation-database", compilationDatabase); - std::forward(f)("input", input); - std::forward(f)("recursive", recursive); - std::forward(f)("file-patterns", filePatterns); - std::forward(f)("exclude", exclude); - std::forward(f)("exclude-patterns", excludePatterns); - std::forward(f)("include-symbols", includeSymbols); - std::forward(f)("exclude-symbols", excludeSymbols); - std::forward(f)("see-below", seeBelow); - std::forward(f)("implementation-defined", implementationDefined); - std::forward(f)("missing-include-prefixes", missingIncludePrefixes); - std::forward(f)("missing-include-shims", missingIncludeShims); - std::forward(f)("auto-brief", autoBrief); - std::forward(f)("auto-relates", autoRelates); - std::forward(f)("auto-function-metadata", autoFunctionMetadata); - std::forward(f)("extract-all", extractAll); - std::forward(f)("extract-private", extractPrivate); - std::forward(f)("extract-private-virtual", extractPrivateVirtual); - std::forward(f)("extract-private-bases", extractPrivateBases); - std::forward(f)("extract-static", extractStatic); - std::forward(f)("extract-local-classes", extractLocalClasses); - std::forward(f)("extract-anonymous-namespaces", extractAnonymousNamespaces); - std::forward(f)("extract-empty-namespaces", extractEmptyNamespaces); - std::forward(f)("inherit-base-members", inheritBaseMembers); - std::forward(f)("extract-implicit-specializations", extractImplicitSpecializations); - std::forward(f)("extract-friends", extractFriends); - std::forward(f)("sort-members", sortMembers); - std::forward(f)("sort-members-by", sortMembersBy); - std::forward(f)("sort-namespace-members-by", sortNamespaceMembersBy); - std::forward(f)("sort-members-ctors-1st", sortMembersCtors1St); - std::forward(f)("sort-members-dtors-1st", sortMembersDtors1St); - std::forward(f)("sort-members-assignment-1st", sortMembersAssignment1St); - std::forward(f)("sort-members-conversion-last", sortMembersConversionLast); - std::forward(f)("sort-members-relational-last", sortMembersRelationalLast); - std::forward(f)("sfinae", sfinae); - std::forward(f)("overloads", overloads); - std::forward(f)("generator", generator); - std::forward(f)("multipage", multipage); - std::forward(f)("base-url", baseUrl); - std::forward(f)("addons", addons); - std::forward(f)("tagfile", tagfile); - std::forward(f)("legible-names", legibleNames); - std::forward(f)("embedded", embedded); - std::forward(f)("show-namespaces", showNamespaces); - std::forward(f)("global-namespace-index", globalNamespaceIndex); - std::forward(f)("cmake", cmake); - std::forward(f)("defines", defines); - std::forward(f)("use-system-stdlib", useSystemStdlib); - std::forward(f)("stdlib-includes", stdlibIncludes); - std::forward(f)("use-system-libc", useSystemLibc); - std::forward(f)("libc-includes", libcIncludes); - std::forward(f)("system-includes", systemIncludes); - std::forward(f)("includes", includes); - std::forward(f)("verbose", verbose); - std::forward(f)("report", report); - std::forward(f)("log-level", logLevel); - std::forward(f)("warnings", warnings); - std::forward(f)("warn-if-undocumented", warnIfUndocumented); - std::forward(f)("warn-if-doc-error", warnIfDocError); - std::forward(f)("warn-no-paramdoc", warnNoParamdoc); - std::forward(f)("warn-unnamed-param", warnUnnamedParam); - std::forward(f)("warn-if-undoc-enum-val", warnIfUndocEnumVal); - std::forward(f)("warn-broken-ref", warnBrokenRef); - std::forward(f)("warn-as-error", warnAsError); - std::forward(f)("concurrency", concurrency); - std::forward(f)("ignore-map-errors", ignoreMapErrors); - std::forward(f)("ignore-failures", ignoreFailures); - } - - /** Visit all options - - @param f The visitor - */ - template - void - visit(F&& f) const - { - std::forward(f)("cmd-line-inputs", cmdLineInputs); - std::forward(f)("config", config); - std::forward(f)("source-root", sourceRoot); - std::forward(f)("output", output); - std::forward(f)("compilation-database", compilationDatabase); - std::forward(f)("input", input); - std::forward(f)("recursive", recursive); - std::forward(f)("file-patterns", filePatterns); - std::forward(f)("exclude", exclude); - std::forward(f)("exclude-patterns", excludePatterns); - std::forward(f)("include-symbols", includeSymbols); - std::forward(f)("exclude-symbols", excludeSymbols); - std::forward(f)("see-below", seeBelow); - std::forward(f)("implementation-defined", implementationDefined); - std::forward(f)("missing-include-prefixes", missingIncludePrefixes); - std::forward(f)("missing-include-shims", missingIncludeShims); - std::forward(f)("auto-brief", autoBrief); - std::forward(f)("auto-relates", autoRelates); - std::forward(f)("auto-function-metadata", autoFunctionMetadata); - std::forward(f)("extract-all", extractAll); - std::forward(f)("extract-private", extractPrivate); - std::forward(f)("extract-private-virtual", extractPrivateVirtual); - std::forward(f)("extract-private-bases", extractPrivateBases); - std::forward(f)("extract-static", extractStatic); - std::forward(f)("extract-local-classes", extractLocalClasses); - std::forward(f)("extract-anonymous-namespaces", extractAnonymousNamespaces); - std::forward(f)("extract-empty-namespaces", extractEmptyNamespaces); - std::forward(f)("inherit-base-members", inheritBaseMembers); - std::forward(f)("extract-implicit-specializations", extractImplicitSpecializations); - std::forward(f)("extract-friends", extractFriends); - std::forward(f)("sort-members", sortMembers); - std::forward(f)("sort-members-by", sortMembersBy); - std::forward(f)("sort-namespace-members-by", sortNamespaceMembersBy); - std::forward(f)("sort-members-ctors-1st", sortMembersCtors1St); - std::forward(f)("sort-members-dtors-1st", sortMembersDtors1St); - std::forward(f)("sort-members-assignment-1st", sortMembersAssignment1St); - std::forward(f)("sort-members-conversion-last", sortMembersConversionLast); - std::forward(f)("sort-members-relational-last", sortMembersRelationalLast); - std::forward(f)("sfinae", sfinae); - std::forward(f)("overloads", overloads); - std::forward(f)("generator", generator); - std::forward(f)("multipage", multipage); - std::forward(f)("base-url", baseUrl); - std::forward(f)("addons", addons); - std::forward(f)("tagfile", tagfile); - std::forward(f)("legible-names", legibleNames); - std::forward(f)("embedded", embedded); - std::forward(f)("show-namespaces", showNamespaces); - std::forward(f)("global-namespace-index", globalNamespaceIndex); - std::forward(f)("cmake", cmake); - std::forward(f)("defines", defines); - std::forward(f)("use-system-stdlib", useSystemStdlib); - std::forward(f)("stdlib-includes", stdlibIncludes); - std::forward(f)("use-system-libc", useSystemLibc); - std::forward(f)("libc-includes", libcIncludes); - std::forward(f)("system-includes", systemIncludes); - std::forward(f)("includes", includes); - std::forward(f)("verbose", verbose); - std::forward(f)("report", report); - std::forward(f)("log-level", logLevel); - std::forward(f)("warnings", warnings); - std::forward(f)("warn-if-undocumented", warnIfUndocumented); - std::forward(f)("warn-if-doc-error", warnIfDocError); - std::forward(f)("warn-no-paramdoc", warnNoParamdoc); - std::forward(f)("warn-unnamed-param", warnUnnamedParam); - std::forward(f)("warn-if-undoc-enum-val", warnIfUndocEnumVal); - std::forward(f)("warn-broken-ref", warnBrokenRef); - std::forward(f)("warn-as-error", warnAsError); - std::forward(f)("concurrency", concurrency); - std::forward(f)("ignore-map-errors", ignoreMapErrors); - std::forward(f)("ignore-failures", ignoreFailures); - } - -}; // struct PublicSettings - -/** Convert a PublicSettings::Generator" to a string - */ -constexpr -std::string_view -to_string(PublicSettings::Generator e) -{ - switch (e) - { - case PublicSettings::Generator::Adoc: - return "adoc"; - case PublicSettings::Generator::Html: - return "html"; - case PublicSettings::Generator::Xml: - return "xml"; - } - return {}; -} - -/** Convert a PublicSettings::LogLevel" to a string - */ -constexpr -std::string_view -to_string(PublicSettings::LogLevel e) -{ - switch (e) - { - case PublicSettings::LogLevel::Trace: - return "trace"; - case PublicSettings::LogLevel::Debug: - return "debug"; - case PublicSettings::LogLevel::Info: - return "info"; - case PublicSettings::LogLevel::Warn: - return "warn"; - case PublicSettings::LogLevel::Error: - return "error"; - case PublicSettings::LogLevel::Fatal: - return "fatal"; - } - return {}; -} - -/** Convert a PublicSettings::BaseMemberInheritance" to a string - */ -constexpr -std::string_view -to_string(PublicSettings::BaseMemberInheritance e) -{ - switch (e) - { - case PublicSettings::BaseMemberInheritance::Never: - return "never"; - case PublicSettings::BaseMemberInheritance::Reference: - return "reference"; - case PublicSettings::BaseMemberInheritance::CopyDependencies: - return "copy-dependencies"; - case PublicSettings::BaseMemberInheritance::CopyAll: - return "copy-all"; - } - return {}; -} - -/** Convert a PublicSettings::SortSymbolBy" to a string - */ -constexpr -std::string_view -to_string(PublicSettings::SortSymbolBy e) -{ - switch (e) - { - case PublicSettings::SortSymbolBy::Name: - return "name"; - case PublicSettings::SortSymbolBy::Location: - return "location"; - } - return {}; -} - -} // namespace clang::mrdocs - -#endif // MRDOCS_PUBLIC_SETTINGS_HPP diff --git a/docs/config-headers/src/tool/PublicToolArgs.hpp b/docs/config-headers/src/tool/PublicToolArgs.hpp deleted file mode 100644 index 73162f118..000000000 --- a/docs/config-headers/src/tool/PublicToolArgs.hpp +++ /dev/null @@ -1,1024 +0,0 @@ -/* - * This file is generated automatically from the json file - * `src/lib/Lib/ConfigOptions.json`. Do not edit this file - * manually. Instead, edit the json file and run the script - * `util/generate-config-info.py` to regenerate this file. - */ - -#ifndef MRDOCS_PUBLIC_TOOLARGS_HPP -#define MRDOCS_PUBLIC_TOOLARGS_HPP - -#include -#include -#include -#include - -namespace clang { -namespace mrdocs { - -struct PublicToolArgs { - - /// Construct the PublicToolArgs object - PublicToolArgs(); - - /// Override settings with unnormalized values from the command line - Expected - apply( - PublicSettings& s, - ReferenceDirectories const& dirs, - char const** argv); - - //-------------------------------------------- - // Option Categories - //-------------------------------------------- - /** Options that can only be provided via the command line - - The following options can be used to control the general behavior of Mr.Docs - and can only be provided via the command line. These include options to - specify inputs and the configuration file, which cannot be set on the - configuration file itself. - */ - llvm::cl::OptionCategory commandLineOptionsCat; - - /** Paths to the source code and output directories - */ - llvm::cl::OptionCategory pathsCat; - - /** Filters to include or exclude files and symbols from the documentation - */ - llvm::cl::OptionCategory filtersCat; - - /** Options to control how the source code is parsed - - Mr.Docs uses libclang to parse the source code and extract symbols. The - following options control how the source code is parsed. - */ - llvm::cl::OptionCategory semanticParsingCat; - - /** Options to control how comments are parsed - - Mr.Docs extracts metadata from the comments in the source code. The - following options control how comments are parsed. - */ - llvm::cl::OptionCategory commentParsingCat; - - /** Metadata and C++ semantic constructs to extract - - MrDocs extracts metadata and C++ semantic constructs from the source code to - create the documentation. Semantic constructs are patterns not directly - represented in the source code AST but can be inferred from the corpus, such - as SFINAE. The following options control the extraction of metadata and C++ - semantic constructs. - */ - llvm::cl::OptionCategory metadataExtractionCat; - - /** C++ semantic constructs to extract - - Semantic constructs are patterns not directly represented in the source code - AST but can be inferred from the corpus, such as SFINAE. - */ - llvm::cl::OptionCategory semanticConstructsCat; - - /** Generators to create the documentation and their options - */ - llvm::cl::OptionCategory generatorsCat; - - /** Options for building the source code - - When MrDocs is responsible to running the build scripts and generating the - compilation database, these options are used to build the source code. - */ - llvm::cl::OptionCategory buildOptionsCat; - - /** Warnings and progress messages - */ - llvm::cl::OptionCategory warningsCat; - - /** Miscellaneous options - */ - llvm::cl::OptionCategory miscellaneousCat; - - - //-------------------------------------------- - // Command Line Options - // - // Options that can only be provided via the command line - //-------------------------------------------- - - /** Configuration or compilation database files - - The inputs are configuration files or compilation database files that - used to generate the documentation. - - When the input ends with `mrdocs.yml`, it is interpreted as a - configuration file, the file is read and the options are used to - generate the documentation as if it was provided to the `config` - option. - - When the input ends with `compilation_database.json` or - `CMakeLists.txt`, it is interpreted as a compilation database file, - the file is read and the compiler flags are used to generate the - documentation as if it was provided to the `compilation-database` - option. - */ - llvm::cl::list cmdLineInputs; - - /** Mr.Docs configuration file - - The configuration file is a YAML file that contains the options used - to generate the documentation. - - The configuration file is read and the options are used to generate - the documentation. - - The configuration file can be used to specify the source code, the - output directory, the compilation database, the generator, and the - filters. - */ - llvm::cl::opt config; - - //-------------------------------------------- - // Paths - // - // Paths to the source code and output directories - //-------------------------------------------- - - /** Path to the root directory of the source code - - Path to the root directory of the source code. - - This path is used as a default for input files and a base for relative - paths formed from absolute paths. - - This should typically be the root directory of the git project, as - relative paths formed from it can be used to create links to these - source files in the repository. - - Templates use the `base-url` option to create links to the source - code. - */ - llvm::cl::opt sourceRoot; - - /** Directory or file for generating output - - Multipage generators expect a directory. - - Single page generators expect a file or a directory where the file - will be created. - - If the directory does not exist, it will be created. - */ - llvm::cl::opt output; - - /** Path to the compilation database - - Path to the compilation database or a build script to generate it. - - The compilation database is a JSON file that contains the compiler - commands used to build the source code. - - The compilation database is used to extract the compiler flags and the - source files used to build the source code and extract symbols. - - This option also accepts the path to a build script such as - CMakeLists.txt to be used to generate the compilation database. - - In this case, Mr.Docs will look for CMake in `PATH` or in `CMAKE_ROOT` - and run the script to generate the compilation database file. - */ - llvm::cl::opt compilationDatabase; - - //-------------------------------------------- - // Filters - // - // Filters to include or exclude files and symbols from the documentation - //-------------------------------------------- - - /** Input directories to extract symbols from - - Input directories to extract. - - Only symbols defined in files in these directories are extracted. - - The paths are relative to the mrdocs configuration file. - */ - llvm::cl::list input; - - /** Recursively include files from "input" paths - - Recursively include files. - - When set to true, Mr.Docs includes files in subdirectories of the - input directories. - - When set to false, Mr.Docs includes only the files in the input - directories. - */ - llvm::cl::opt recursive; - - /** File patterns to include - - File patterns to include. - - Only the files that match these patterns are extracted. - - The patterns are relative to the input directories. - */ - llvm::cl::list filePatterns; - - /** Input directories to exclude - - Symbols defined in files in these directories are not extracted even - if they are in the list of include directories. - - When relative, the paths are relative to the directory of the mrdocs - configuration file. - - For instance, "include/experimental" will exclude all files in the - directory `/include/experimental`. - */ - llvm::cl::list exclude; - - /** File patterns to exclude - - File patterns to exclude. - - Files that match these patterns are not extracted even if they are in - the list of include directories. - - The patterns are relative to the configuration file. - - A single * will match all files in the directory. - - Double ** will match all files in the directory and its - subdirectories. - */ - llvm::cl::list excludePatterns; - - /** Symbol patterns to include - - If any patterns are defined here, only symbols that match one of these - patterns are extracted. - - The patterns are applied to the fully qualified name of the symbol - without any leading "::". - - A single "*" will match all symbols in the namespace. - - Double "**" will match all symbols in the namespace and its - subnamespaces. - - The patterns also support "?" for any chars, "[]" for charsets, - "[^]" for inverted charsets, and "{,...}" for - alternatives. - */ - llvm::cl::list includeSymbols; - - /** Symbol patterns to exclude - - A symbol that matches one of these patterns is not extracted even if - whitelisted by "include-symbols". - - See the documentation for "include-symbols" for the pattern syntax. - */ - llvm::cl::list excludeSymbols; - - /** Exposition only symbols rendered as "see-below". - - Symbols that match one of these filters are tagged as "see-below" in - the documentation, and so do symbols in scopes tagged as "see-below". - - This option is used to remove details about symbols that are - considered part of the private API of the project but the user might - need to interact with. - - In the documentation page for this symbol, the symbol is exposition - only: the synopsis of the implementation is rendered as "see-below" - and members of scopes (such as a namespace or record) are not listed. - - The rest of the documentation is rendered as usual to explain the - symbol. - - See the documentation for "include-symbol" for the pattern syntax. - */ - llvm::cl::list seeBelow; - - /** Symbols rendered as "implementation-defined" - - Symbols that match one of these filters are tagged as - "implementation-defined" in the documentation, and so do symbols in - scopes tagged as "implementation-defined". - - This option is used to exclude symbols from the documentation that are - considered part of the private API of the project. - - An "implementation-defined" symbol has no documentation page in the - output. - - If any other symbol refers to it, the reference is rendered as - "implementation-defined". - - See the documentation for "include-symbol" for the pattern syntax. - */ - llvm::cl::list implementationDefined; - - //-------------------------------------------- - // Semantic Parsing - // - // Options to control how the source code is parsed - //-------------------------------------------- - - /** Include path prefixes allowed to be missing - - Specifies path prefixes for include files that, if missing, will not - cause documentation generation to fail. - - Missing files with these prefixes are served as empty files from an - in-memory file system, allowing processing to continue. - - For example, use "llvm/" to forgive all includes from LLVM. - - If any such path is specified, MrDocs will attempt to synthesize - missing included types. - - Only simple sets of non-conflicting inferred types can be synthesized. - - For more complex types or for better control, provide a shim using the - "missing-include-shims" option. - */ - llvm::cl::list missingIncludePrefixes; - - /** Shims for forgiven missing include files - - Specifies a map of include file paths to shim contents. - - If a missing include file matches a forgiven prefix, MrDocs will use - the shim content from this map as the file contents. - - If no shim is provided for a forgiven file, an empty file is used by - default. - */ - llvm::cl::list missingIncludeShims; - - //-------------------------------------------- - // Comment Parsing - // - // Options to control how comments are parsed - //-------------------------------------------- - - /** Use the first line of the comment as the brief - - When set to `true`, Mr.Docs uses the first line (until the first dot, - question mark, or exclamation mark) of the comment as the brief of the - symbol. - - When set to `false`, a explicit @brief command is required. - */ - llvm::cl::opt autoBrief; - - /** Automatically find non-member functions - - When set to `true`, Mr.Docs automatically finds non-member functions - that are related to the current class. - */ - llvm::cl::opt autoRelates; - - /** Automatically provide missing documentation for special functions - and trivial metadata - - When set to `true`, Mr.Docs automatically provides documentation for - special functions, such as constructors, destructors, and operators. - - It also provides documentation for missing documentation metadata, - such as known types. - */ - llvm::cl::opt autoFunctionMetadata; - - //-------------------------------------------- - // Metadata Extraction - // - // Metadata and C++ semantic constructs to extract - //-------------------------------------------- - - /** Extract all symbols - - When set to `true`, MrDocs extracts all symbols from the source code, - even if no documentation is provided. - - MrDocs can only identify whether a symbol is ultimated documented - after extracting information from all translation units. - - For this reason, when this option is set to `false`, it's still - recommendable to provide file and symbol filters so that only the - desired symbols are traversed and stored by MrDocs. - */ - llvm::cl::opt extractAll; - - /** Extraction policy for private class members - - Determine whether private class members should be extracted - */ - llvm::cl::opt extractPrivate; - - /** Extraction policy for private virtual methods of a class - - Determine whether private virtual methods of a class should be - extracted - */ - llvm::cl::opt extractPrivateVirtual; - - /** Extraction policy for private base classes - - Determine whether private base classes should be extracted - */ - llvm::cl::opt extractPrivateBases; - - /** Extraction policy for static members of a file - - Determine whether static members of a file should be extracted. - - This option does not refer to static members of a class. - */ - llvm::cl::opt extractStatic; - - /** Extraction policy for records defined locally in source files - - Determine whether records only defined locally in source files should - be extracted. - */ - llvm::cl::opt extractLocalClasses; - - /** Extraction policy for anonymous namespaces - - Determine whether symbols in anonymous namespaces should be extracted. - */ - llvm::cl::opt extractAnonymousNamespaces; - - /** Extraction policy for empty namespaces - - Determine whether empty namespaces without documentation should be - extracted. - */ - llvm::cl::opt extractEmptyNamespaces; - - /** Determine how derived classes inherit base members - - Determine how derived classes inherit members of base classes. - - When set to `never`, derived classes do not inherit members of base - classes and only the relationship is stored. - - When set to `reference`, derived classes list members of base classes - but references are still linked to the base class. - - When set to `copy-dependencies`, a reference is created by default and - a copy is created when the base class is a dependency. - - When set to `copy-all`, a copy is created for each base symbol as if - it was declared in the derived class. - - If the base class is a dependency, the extraction mode is copied from - the new parent. - */ - llvm::cl::opt inheritBaseMembers; - - /** Implicit template specializations used as base classes are - extracted as dependencies - - When set to `true`, MrDocs extracts implicit template specializations - used as base classes as dependencies. - - This allows MrDocs to extract metadata that can later be used to - determine the members of the derived class, as specified by the - `inherit-base-members` option. - */ - llvm::cl::opt extractImplicitSpecializations; - - /** Extraction policy for friend functions and classes - - Determine whether friend functions and classes should be extracted. - - When set to `true`, MrDocs extracts friend functions and classes. - - When set to `false`, friend functions and classes are not extracted. - */ - llvm::cl::opt extractFriends; - - /** Sort the members of a record - - When set to `true`, sort the members of a record by the criterion - determined in the `sort-members-by` option. - - When set to `false`, the members are included in the declaration order - they are extracted. - */ - llvm::cl::opt sortMembers; - - /** Determine how members of a record are sorted - - If `sort-members` is set to `true`, determine how members of a record - are sorted. - - When set to `name`, members are sorted by name. - - When set to `location`, members are sorted by their primary location - in the source code, considering the short name of the path and the - location in the file. - */ - llvm::cl::opt sortMembersBy; - - /** Determine how members of a namespace are sorted - - Although members of namespaces are always sorted, determine how - members of a namespace are sorted. - - When set to `name`, members are sorted by name. - - When set to `location`, members are sorted by their primary location - in the source code, considering the short name of the path and the - location in the file. - */ - llvm::cl::opt sortNamespaceMembersBy; - - /** Sort constructors first - - When set to `true`, constructors are sorted first in the list of - members of a record. - */ - llvm::cl::opt sortMembersCtors1St; - - /** Sort destructors first - - When set to `true`, destructors are sorted first in the list of - members of a record. - */ - llvm::cl::opt sortMembersDtors1St; - - /** Sort assignment operators first - - When set to `true`, assignment operators are sorted first in the list - of members of a record. - */ - llvm::cl::opt sortMembersAssignment1St; - - /** Sort conversion operators last - - When set to `true`, conversion operators are sorted last in the list - of members of a record or namespace. - */ - llvm::cl::opt sortMembersConversionLast; - - /** Sort relational operators last - - When set to `true`, relational operators are sorted last in the list - of members of a record or namespace. - */ - llvm::cl::opt sortMembersRelationalLast; - - //-------------------------------------------- - // Semantic Constructs - // - // C++ semantic constructs to extract - //-------------------------------------------- - - /** Detect and reduce SFINAE expressions - - When set to true, MrDocs detects SFINAE expressions in the source code - and extracts them as part of the documentation. - - Expressions such as `std::enable_if<...>` are detected, removed, and - documented as a requirement. - - MrDocs uses an algorithm that extracts SFINAE infomation from types by - identifying inspecting the primary template and specializations to - detect the result type and the controlling expressions in a - specialization. - */ - llvm::cl::opt sfinae; - - /** Detect and group function overloads - - When set to `true`, MrDocs detects function overloads and groups them - as a single symbol type. - - The documentation for this new symbol comes from the union of - non-ambiguous metadata from the functions. - */ - llvm::cl::opt overloads; - - //-------------------------------------------- - // Generators - // - // Generators to create the documentation and their options - //-------------------------------------------- - - /** Generator used to create the documentation - - The generator is responsible for creating the documentation from the - extracted symbols. - - The generator uses the extracted symbols and the templates to create - the documentation. - - The generator can create different types of documentation such as - HTML, XML, and AsciiDoc. - */ - llvm::cl::opt generator; - - /** Generate a multipage documentation - - Generates a multipage documentation. - - The output directory must be a directory. - - This option acts as a hint to the generator to create a multipage - documentation. - - Whether the hint is followed or not depends on the generator. - */ - llvm::cl::opt multipage; - - /** Base URL for links to source code - - Base URL for links to source code. - - The base URL is used to create links to the source code in the - documentation. - - The base URL is combined with the path to the source file to create - the link. - */ - llvm::cl::opt baseUrl; - - /** Path to the Addons directory - - Path to the Addons directory. - - The Addons directory contains the template files used by generators to - create the documentation. - - When a custom Addons directory is not specified, the default templates - are used. - - The default templates are located at the `share/mrdocs/addons` - directory of the MrDocs installation. - - Users can create custom templates by copying the default templates to - a custom directory and specifying the custom directory using this - option. - */ - llvm::cl::opt addons; - - /** Path for the tagfile - - Specifies the full path (filename) where the generated tagfile should - be saved. - - If left empty, no tagfile will be generated. - */ - llvm::cl::opt tagfile; - - /** Use legible names - - Use legible names for ids in the documentation. - - When set to true, MrDocs uses legible names for symbols in the - documentation. - - These are symbols that are legible but still safe for URLs. - - When the option is set to false, MrDocs uses a hash of the symbol ID. - */ - llvm::cl::opt legibleNames; - - /** Output an embeddable document - - Output an embeddable document, which excludes the header, the footer, - and everything outside the body of the document. - - This option is useful for producing documents that can be inserted - into an external template. - */ - llvm::cl::opt embedded; - - /** Show namespace pages in the documentation - - When set to true, MrDocs creates a page for each namespace in the - documentation. - */ - llvm::cl::opt showNamespaces; - - /** Use the global namespace page as an index for all symbols - - When set to true, the page for the global namespace will recursively - list all symbols in the documentation, not just those in the global - namespace. - - This makes the global namespace page act as an index for the entire - project. - */ - llvm::cl::opt globalNamespaceIndex; - - //-------------------------------------------- - // Build options - // - // Options for building the source code - //-------------------------------------------- - - /** CMake arguments when generating the compilation database from - CMakeLists.txt - - When the compilation-database option is a CMakeLists.txt file, these - arguments are passed to the cmake command to generate the - compilation_database.json. - */ - llvm::cl::opt cmake; - - /** Additional defines passed to the compiler - - Additional defines passed to the compiler when building the source - code. - - These defines are added to the compilation database regardless of the - strategy to generate it. - */ - llvm::cl::list defines; - - /** Use the system C++ standard library - - To achieve reproducible results, MrDocs bundles the LibC++ headers. - - To use the C++ standard library available in the system instead, set - this option to true. - */ - llvm::cl::opt useSystemStdlib; - - /** C++ Standard Library include paths - - When `use-system-stdlib` is disabled, the C++ standard library headers - are available in these paths. - */ - llvm::cl::list stdlibIncludes; - - /** Use the system C standard library - - To achieve reproducible results, MrDocs bundles the LibC headers with - its definitions. - - To use the C standard library available in the system instead, set - this option to true. - */ - llvm::cl::opt useSystemLibc; - - /** Standard Library include paths - - When `use-system-libc` is disabled, the C standard library headers are - available in these paths. - */ - llvm::cl::list libcIncludes; - - /** System include paths - - System include paths. - - These paths are used to add directories to the system include search - path. - - The system include search path is used to search for system headers. - - The system headers are headers that are provided by the system and are - not part of the project. - - The system headers are used to provide the standard library headers - and other system headers. - - The system headers are not part of the project and are not checked for - warnings and errors. - */ - llvm::cl::list systemIncludes; - - /** Include paths - - Include paths. - - These paths are used to add directories to the include search path. - - The include search path is used to search for headers. - - The headers are used to provide declarations and definitions of - symbols. - - The headers are part of the project and are checked for warnings and - errors. - */ - llvm::cl::list includes; - - //-------------------------------------------- - // Warnings - // - // Warnings and progress messages - //-------------------------------------------- - - /** Verbose output - - Verbose output. - - When set to true, MrDocs outputs additional information during the - generation of the documentation. - */ - llvm::cl::opt verbose; - - /** The minimum reporting level - - The reporting level determines the amount of information displayed - during the generation of the documentation. - - The value `-1` delegates the decision to the `log-level` option. - */ - llvm::cl::opt report; - - /** The minimum reporting level - - The reporting level determines the amount of information displayed - during the generation of the documentation. - */ - llvm::cl::opt logLevel; - - /** Enable warning messages - - When set to `true`, MrDocs outputs warning messages during the - generation of the documentation. - - It is usually recommended to enable warnings while writing the - documentation. - */ - llvm::cl::opt warnings; - - /** Warn if symbols are not documented - - When set to `true`, MrDocs outputs a warning message if a symbol that - passes all filters is not documented. - */ - llvm::cl::opt warnIfUndocumented; - - /** Warn if documentation has errors - - When set to `true`, MrDocs outputs a warning message if the - documentation of a symbol has errors such as duplicate parameters and - parameters that don't exist. - */ - llvm::cl::opt warnIfDocError; - - /** Warn if parameters are not documented - - When set to `true`, MrDocs outputs a warning message if a named - function parameter is not documented. - */ - llvm::cl::opt warnNoParamdoc; - - /** Warn if documented functions have unnamed parameters - - When set to `true`, MrDocs outputs a warning message if a documented - function has a parameter that is not named. - */ - llvm::cl::opt warnUnnamedParam; - - /** Warn if enum values are not documented - - When set to `true`, MrDocs outputs a warning message if an enum value - is not documented. - */ - llvm::cl::opt warnIfUndocEnumVal; - - /** Warn if a documentation reference is broken - - When set to `true`, MrDocs outputs a warning message if a reference in - the documentation is broken. - */ - llvm::cl::opt warnBrokenRef; - - /** Treat warnings as errors - - When set to `true`, MrDocs treats warnings as errors and stops the - generation of the documentation. - */ - llvm::cl::opt warnAsError; - - //-------------------------------------------- - // Miscellaneous - // - // Miscellaneous options - //-------------------------------------------- - - /** Number of threads to use - - The desired level of concurrency: 0 for hardware-suggested. - */ - llvm::cl::opt concurrency; - - /** Continue if files are not mapped correctly - - When set to true, MrDocs continues to generate the documentation even - if some files are not mapped correctly. - - Files are not mapped correctly when the source file is not found or - the compilation database does not contain the compiler flags for the - source file. - */ - llvm::cl::opt ignoreMapErrors; - - /** Whether AST visitation failures should not stop the program - - When set to true, MrDocs continues to generate the documentation even - if there are AST visitation failures. - - AST visitation failures occur when the source code contains constructs - that are not supported by MrDocs. - */ - llvm::cl::opt ignoreFailures; - - /** Visit all options - */ - template - void - visit(F&& f) - { - std::forward(f)("cmd-line-inputs", cmdLineInputs); - std::forward(f)("config", config); - std::forward(f)("source-root", sourceRoot); - std::forward(f)("output", output); - std::forward(f)("compilation-database", compilationDatabase); - std::forward(f)("input", input); - std::forward(f)("recursive", recursive); - std::forward(f)("file-patterns", filePatterns); - std::forward(f)("exclude", exclude); - std::forward(f)("exclude-patterns", excludePatterns); - std::forward(f)("include-symbols", includeSymbols); - std::forward(f)("exclude-symbols", excludeSymbols); - std::forward(f)("see-below", seeBelow); - std::forward(f)("implementation-defined", implementationDefined); - std::forward(f)("missing-include-prefixes", missingIncludePrefixes); - std::forward(f)("missing-include-shims", missingIncludeShims); - std::forward(f)("auto-brief", autoBrief); - std::forward(f)("auto-relates", autoRelates); - std::forward(f)("auto-function-metadata", autoFunctionMetadata); - std::forward(f)("extract-all", extractAll); - std::forward(f)("extract-private", extractPrivate); - std::forward(f)("extract-private-virtual", extractPrivateVirtual); - std::forward(f)("extract-private-bases", extractPrivateBases); - std::forward(f)("extract-static", extractStatic); - std::forward(f)("extract-local-classes", extractLocalClasses); - std::forward(f)("extract-anonymous-namespaces", extractAnonymousNamespaces); - std::forward(f)("extract-empty-namespaces", extractEmptyNamespaces); - std::forward(f)("inherit-base-members", inheritBaseMembers); - std::forward(f)("extract-implicit-specializations", extractImplicitSpecializations); - std::forward(f)("extract-friends", extractFriends); - std::forward(f)("sort-members", sortMembers); - std::forward(f)("sort-members-by", sortMembersBy); - std::forward(f)("sort-namespace-members-by", sortNamespaceMembersBy); - std::forward(f)("sort-members-ctors-1st", sortMembersCtors1St); - std::forward(f)("sort-members-dtors-1st", sortMembersDtors1St); - std::forward(f)("sort-members-assignment-1st", sortMembersAssignment1St); - std::forward(f)("sort-members-conversion-last", sortMembersConversionLast); - std::forward(f)("sort-members-relational-last", sortMembersRelationalLast); - std::forward(f)("sfinae", sfinae); - std::forward(f)("overloads", overloads); - std::forward(f)("generator", generator); - std::forward(f)("multipage", multipage); - std::forward(f)("base-url", baseUrl); - std::forward(f)("addons", addons); - std::forward(f)("tagfile", tagfile); - std::forward(f)("legible-names", legibleNames); - std::forward(f)("embedded", embedded); - std::forward(f)("show-namespaces", showNamespaces); - std::forward(f)("global-namespace-index", globalNamespaceIndex); - std::forward(f)("cmake", cmake); - std::forward(f)("defines", defines); - std::forward(f)("use-system-stdlib", useSystemStdlib); - std::forward(f)("stdlib-includes", stdlibIncludes); - std::forward(f)("use-system-libc", useSystemLibc); - std::forward(f)("libc-includes", libcIncludes); - std::forward(f)("system-includes", systemIncludes); - std::forward(f)("includes", includes); - std::forward(f)("verbose", verbose); - std::forward(f)("report", report); - std::forward(f)("log-level", logLevel); - std::forward(f)("warnings", warnings); - std::forward(f)("warn-if-undocumented", warnIfUndocumented); - std::forward(f)("warn-if-doc-error", warnIfDocError); - std::forward(f)("warn-no-paramdoc", warnNoParamdoc); - std::forward(f)("warn-unnamed-param", warnUnnamedParam); - std::forward(f)("warn-if-undoc-enum-val", warnIfUndocEnumVal); - std::forward(f)("warn-broken-ref", warnBrokenRef); - std::forward(f)("warn-as-error", warnAsError); - std::forward(f)("concurrency", concurrency); - std::forward(f)("ignore-map-errors", ignoreMapErrors); - std::forward(f)("ignore-failures", ignoreFailures); - } - -}; // struct PublicToolArgs - -} // namespace mrdocs -} // namespace clang - -#endif // MRDOCS_PUBLIC_TOOLARGS_HPP diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 530b373b2..a0c3266aa 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -6,5 +6,6 @@ * xref:commands.adoc[Documenting the Code] * xref:generators.adoc[] * xref:design-notes.adoc[] +* xref:reference:index.adoc[Library Reference] * xref:contribute.adoc[] * xref:license.adoc[] diff --git a/docs/mrdocs.yml b/docs/mrdocs.yml index 48edcb1b0..f9cdb762b 100644 --- a/docs/mrdocs.yml +++ b/docs/mrdocs.yml @@ -5,10 +5,6 @@ verbose: true source-root: .. input: - ../include -includes: - # Stubs for the generated header symbols - - config-headers/include - - config-headers/src file-patterns: - '*.hpp' include-symbols: @@ -20,3 +16,4 @@ implementation-defined: multipage: true generator: adoc cmake: '-D MRDOCS_DOCUMENTATION_BUILD=ON' + diff --git a/docs/package-lock.json b/docs/package-lock.json index f8f5e7de8..122af8f91 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -8,6 +8,7 @@ "@alandefreitas/antora-playbook-macros-extension": "^0.0.1", "@antora/lunr-extension": "^1.0.0-alpha.8", "@asciidoctor/tabs": "^1.0.0-beta.3", + "@cppalliance/antora-cpp-reference-extension": "^0.0.7", "asciidoctor": "^2.2.6", "sync-request": "^6.1.0" }, @@ -114,7 +115,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@antora/expand-path-helper/-/expand-path-helper-2.0.0.tgz", "integrity": "sha512-CSMBGC+tI21VS2kGW3PV7T2kQTM5eT3f2GTPVLttwaNYbNxDve08en/huzszHJfxo11CcEs26Ostr0F2c1QqeA==", - "dev": true, "engines": { "node": ">=10.17.0" } @@ -343,12 +343,88 @@ "node": ">=16.0.0" } }, + "node_modules/@cppalliance/antora-cpp-reference-extension": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/@cppalliance/antora-cpp-reference-extension/-/antora-cpp-reference-extension-0.0.7.tgz", + "integrity": "sha512-tAt6HY1s4E16nKL5gcT52Qa4vMBkBCs3dJcSitM1W6EjmMZXxvKOQ+OvEZpp1w+W8Qj5JmbcwRTuvRuLQdTjBQ==", + "license": "BSL-1.0", + "dependencies": { + "@antora/expand-path-helper": "^2.0.0", + "axios": "^1.7.2", + "cache-directory": "^2.0.0", + "fast-glob": "^3.3.2", + "isomorphic-git": "^1.27.1", + "js-yaml": "^4.1.0", + "semver": "^7.6.3" + } + }, + "node_modules/@cppalliance/antora-cpp-reference-extension/node_modules/isomorphic-git": { + "version": "1.33.1", + "resolved": "https://registry.npmjs.org/isomorphic-git/-/isomorphic-git-1.33.1.tgz", + "integrity": "sha512-Fy5rPAncURJoqL9R+5nJXLl5rQH6YpcjJd7kdCoRJPhrBiLVkLm9b+esRqYQQlT1hKVtKtALbfNtpHjWWJgk6g==", + "license": "MIT", + "dependencies": { + "async-lock": "^1.4.1", + "clean-git-ref": "^2.0.1", + "crc-32": "^1.2.0", + "diff3": "0.0.3", + "ignore": "^5.1.4", + "minimisted": "^2.0.0", + "pako": "^1.0.10", + "path-browserify": "^1.0.1", + "pify": "^4.0.1", + "readable-stream": "^3.4.0", + "sha.js": "^2.4.12", + "simple-get": "^4.0.1" + }, + "bin": { + "isogit": "cli.cjs" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/@iarna/toml": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", "dev": true }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@sntke/antora-mermaid-extension": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/@sntke/antora-mermaid-extension/-/antora-mermaid-extension-0.0.4.tgz", @@ -430,8 +506,7 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/asap": { "version": "2.0.6", @@ -469,10 +544,10 @@ } }, "node_modules/async-lock": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.0.tgz", - "integrity": "sha512-coglx5yIWuetakm3/1dsX9hxCNox22h7+V80RQOu2XUUMidtArxKoZoOtHUPuR84SycKTXzgGzAUR5hJxujyJQ==", - "dev": true + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/async-lock/-/async-lock-1.4.1.tgz", + "integrity": "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ==", + "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", @@ -488,6 +563,48 @@ "node": ">=8.0.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axios": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", + "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -528,12 +645,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -593,7 +710,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/cache-directory/-/cache-directory-2.0.0.tgz", "integrity": "sha512-7YKEapH+2Uikde8hySyfobXBqPKULDyHNl/lhKm7cKf/GJFdG/tU/WpLrOg2y9aUrQrWUilYqawFIiGJPS6gDA==", - "dev": true, "dependencies": { "xdg-basedir": "^3.0.0" }, @@ -602,15 +718,44 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" }, "engines": { "node": ">= 0.4" @@ -662,8 +807,7 @@ "node_modules/clean-git-ref": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/clean-git-ref/-/clean-git-ref-2.0.1.tgz", - "integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==", - "dev": true + "integrity": "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw==" }, "node_modules/cliui": { "version": "7.0.4", @@ -856,7 +1000,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "dev": true, "bin": { "crc32": "bin/crc32.njs" }, @@ -903,7 +1046,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, "dependencies": { "mimic-response": "^3.1.0" }, @@ -957,8 +1099,7 @@ "node_modules/diff3": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/diff3/-/diff3-0.0.3.tgz", - "integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==", - "dev": true + "integrity": "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==" }, "node_modules/dom-serializer": { "version": "1.4.1", @@ -1011,6 +1152,20 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/duplexify": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz", @@ -1046,12 +1201,10 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -1064,6 +1217,33 @@ "node": ">= 0.4" } }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1102,6 +1282,34 @@ "integrity": "sha512-Knr7NOtK3HWRYGtHoJrjkaWepqT8thIVGAwt0p0aUs1zqkAzXZV4vo9fFNwyb5fcqK1GKYFYxldQdIDVKhUAfA==", "dev": true }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-redact": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.1.2.tgz", @@ -1117,6 +1325,15 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", "dev": true }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", @@ -1127,10 +1344,10 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -1178,6 +1395,41 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/form-data": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", @@ -1226,15 +1478,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -1251,6 +1509,19 @@ "node": ">=4" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", @@ -1321,11 +1592,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1388,10 +1660,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -1399,10 +1672,14 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, "engines": { "node": ">= 0.4" }, @@ -1549,7 +1826,6 @@ "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, "engines": { "node": ">= 4" } @@ -1587,11 +1863,22 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", "dev": true }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -1608,7 +1895,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -1629,7 +1915,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -1646,6 +1932,21 @@ "node": ">=0.10.0" } }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", @@ -1725,7 +2026,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -1821,6 +2121,37 @@ "resolved": "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.9.0.tgz", "integrity": "sha512-Be5vFuc8NAheOIjviCRms3ZqFFBlzns3u9DXpPSZvALetgnydAN0poV71pVLFn0keYy/s4VblMMkqewTLe+KPg==" }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -1844,7 +2175,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, "engines": { "node": ">=10" }, @@ -1867,7 +2197,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1876,7 +2205,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/minimisted/-/minimisted-2.0.1.tgz", "integrity": "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA==", - "dev": true, "dependencies": { "minimist": "^1.2.5" } @@ -2022,8 +2350,7 @@ "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "node_modules/parse-cache-control": { "version": "1.0.1", @@ -2043,6 +2370,12 @@ "parse5": "^6.0.1" } }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "license": "MIT" + }, "node_modules/path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", @@ -2067,7 +2400,6 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "engines": { "node": ">=8.6" }, @@ -2079,7 +2411,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, "engines": { "node": ">=6" } @@ -2177,6 +2508,15 @@ "integrity": "sha512-IWgSzUL8X1w4BIWTwErRgtV8PyOGOOi60uqv0oKuS/fOA8Nco/OeI6lBuc4dyP8MMfdFwyHqTMcBIA7nDiqEqA==", "dev": true }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -2213,6 +2553,12 @@ "asap": "~2.0.6" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -2257,6 +2603,26 @@ "inherits": "~2.0.0" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/quick-format-unescaped": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", @@ -2267,7 +2633,6 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -2357,11 +2722,43 @@ "node": ">= 0.10" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, "funding": [ { "type": "github", @@ -2392,6 +2789,18 @@ "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", "dev": true }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -2409,16 +2818,23 @@ } }, "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", + "license": "(MIT AND BSD-3-Clause)", "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" }, "bin": { "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/should-proxy": { @@ -2448,7 +2864,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, "funding": [ { "type": "github", @@ -2468,7 +2883,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "dev": true, "funding": [ { "type": "github", @@ -2526,7 +2940,6 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -2692,11 +3105,31 @@ "node": ">=0.10.0" } }, + "node_modules/to-buffer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", + "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==", + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/to-buffer/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -2721,6 +3154,20 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -2949,6 +3396,27 @@ "node": ">= 0.10" } }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -2980,7 +3448,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", "integrity": "sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ==", - "dev": true, "engines": { "node": ">=4" } diff --git a/docs/package.json b/docs/package.json index ec6f9bb67..a627b5515 100644 --- a/docs/package.json +++ b/docs/package.json @@ -8,6 +8,7 @@ "@alandefreitas/antora-playbook-macros-extension": "^0.0.1", "@antora/lunr-extension": "^1.0.0-alpha.8", "@asciidoctor/tabs": "^1.0.0-beta.3", + "@cppalliance/antora-cpp-reference-extension": "^0.0.7", "asciidoctor": "^2.2.6", "sync-request": "^6.1.0" } diff --git a/include/mrdocs/Version.hpp.in b/include/mrdocs/Version.hpp.in index 9b91420a8..ca5d21acc 100644 --- a/include/mrdocs/Version.hpp.in +++ b/include/mrdocs/Version.hpp.in @@ -12,17 +12,47 @@ #define MRDOCS_VERSION_HPP #include +#include namespace clang { namespace mrdocs { -constexpr std::string_view project_version = "@PROJECT_VERSION@"; -constexpr std::size_t project_version_major = @PROJECT_VERSION_MAJOR@; -constexpr std::size_t project_version_minor = @PROJECT_VERSION_MINOR@; -constexpr std::size_t project_version_patch = @PROJECT_VERSION_PATCH@; -constexpr std::string_view project_version_build = "@PROJECT_VERSION_BUILD@"; -constexpr std::string_view project_name = "@PROJECT_NAME@"; -constexpr std::string_view project_description = "@PROJECT_DESCRIPTION@"; +/** Project version string in MAJOR.MINOR.PATCH format. +*/ +inline constexpr std::string_view project_version = "@PROJECT_VERSION@"; + +/** Project version string with build metadata. + + Includes the git short SHA when not on a tagged commit, + and optional ".dirty" if the working tree was modified. +*/ +inline constexpr std::string_view project_version_with_build = "@PROJECT_VERSION_WITH_BUILD@"; + +/** Major version number. +*/ +inline constexpr std::size_t project_version_major = @PROJECT_VERSION_MAJOR@; + +/** Minor version number. +*/ +inline constexpr std::size_t project_version_minor = @PROJECT_VERSION_MINOR@; + +/** Patch version number. +*/ +inline constexpr std::size_t project_version_patch = @PROJECT_VERSION_PATCH@; + +/** Full 40-character git commit SHA for this build. + + Empty if the git information was unavailable. +*/ +inline constexpr std::string_view project_version_build = "@PROJECT_VERSION_BUILD@"; + +/** Canonical project name. +*/ +inline constexpr std::string_view project_name = "@PROJECT_NAME@"; + +/** Short description of the project. +*/ +inline constexpr std::string_view project_description = "@PROJECT_DESCRIPTION@"; } // mrdocs } // clang diff --git a/src/tool/ToolMain.cpp b/src/tool/ToolMain.cpp index 4bde14907..46bbeca11 100644 --- a/src/tool/ToolMain.cpp +++ b/src/tool/ToolMain.cpp @@ -41,7 +41,7 @@ print_version(llvm::raw_ostream& os) { os << project_name << "\n " << project_description - << "\n version: " << project_version + << "\n version: " << project_version_with_build << "\n build: " << project_version_build << "\n built with LLVM " << LLVM_VERSION_STRING << "\n";