Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,44 @@ jobs:
run: |
rm -r ../third-party/llvm-project

- name: Install Boost.Mp11
uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.12
with:
source-dir: ../third-party/boost_mp11
git-repository: https://github.com/boostorg/mp11
git-tag: boost-1.90.0
patches: |
./third-party/patches/boost_mp11/CMakeLists.txt
./third-party/patches/boost_mp11/boost_mp11-config.cmake.in
build-dir: ${sourceDir}/build
cc: ${{ steps.setup-cpp.outputs.cc }}
cxx: ${{ steps.setup-cpp.outputs.cxx }}
build-type: Release
shared: false
install: true
install-prefix: ${sourceDir}/install
run-tests: false
trace-commands: true

- name: Install Boost.Describe
uses: alandefreitas/cpp-actions/cmake-workflow@v1.8.12
with:
source-dir: ../third-party/boost_describe
git-repository: https://github.com/boostorg/describe
git-tag: boost-1.90.0
patches: |
./third-party/patches/boost_describe/CMakeLists.txt
./third-party/patches/boost_describe/boost_describe-config.cmake.in
build-dir: ${sourceDir}/build
cc: ${{ steps.setup-cpp.outputs.cc }}
cxx: ${{ steps.setup-cpp.outputs.cxx }}
build-type: Release
shared: false
install: true
install-prefix: ${sourceDir}/install
run-tests: false
trace-commands: true

- name: Install JerryScript
uses: alandefreitas/cpp-actions/cmake-workflow@v1.9.2
with:
Expand Down Expand Up @@ -567,6 +605,8 @@ jobs:
-D LUA_ROOT="${{ steps.rmatrix.outputs.third-party-dir }}/lua/install"
-D Lua_ROOT="${{ steps.rmatrix.outputs.third-party-dir }}/lua/install"
-D lua_ROOT="${{ steps.rmatrix.outputs.third-party-dir }}/lua/install"
-D boost_mp11_ROOT="${{ steps.rmatrix.outputs.third-party-dir }}/boost_mp11/install"
-D boost_describe_ROOT="${{ steps.rmatrix.outputs.third-party-dir }}/boost_describe/install"
${{ runner.os == 'Windows' && '-D LibXml2_ROOT=../third-party/libxml2/install' || '' }}
export-compile-commands: true
run-tests: true
Expand All @@ -575,7 +615,7 @@ jobs:
package-dir: packages
package-generators: ${{ matrix.mrdocs-package-generators }}
package-artifact: false
ctest-timeout: 3600
ctest-timeout: 9000

- name: Check YAML schema
run: |
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ endif()

set(CMAKE_FOLDER Dependencies)

# Boost.Describe + Boost.Mp11 (header-only, fetched via bootstrap.py recipes)
find_package(boost_mp11 REQUIRED)
find_package(boost_describe REQUIRED)

# LLVM + Clang
if (LLVM_ROOT)
# LLVM_ROOT is absolute
Expand Down Expand Up @@ -329,6 +333,7 @@ target_compile_definitions(
PRIVATE
-DMRDOCS_TOOL
)
target_link_libraries(mrdocs-core PRIVATE Boost::describe Boost::mp11)

# Dependencies
target_include_directories(mrdocs-core
Expand Down
8 changes: 8 additions & 0 deletions docs/mrdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ implementation-defined:
- 'mrdocs::detail'
- 'mrdocs::report::detail'
- 'mrdocs::dom::detail'
exclude-symbols:
# Symbols defined when using the Boost.Describe macros.
- '**::boost_base_descriptor_fn'
- '**::boost_public_member_descriptor_fn'
- '**::boost_protected_member_descriptor_fn'
- '**::boost_private_member_descriptor_fn'
- '**::boost_enum_descriptor_fn'
- '**::should_use_BOOST_DESCRIBE_NESTED_ENUM'
multipage: true
generator: adoc
cmake: '-D MRDOCS_DOCUMENTATION_BUILD=ON'
Expand Down
21 changes: 21 additions & 0 deletions include/mrdocs/Dom/LazyArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// Copyright (c) 2024 Alan de Freitas (alandefreitas@gmail.com)
// Copyright (c) 2025 Gennaro Prota (gennaro.prota@gmail.com)
//
// Official repository: https://github.com/cppalliance/mrdocs
//
Expand Down Expand Up @@ -211,6 +212,26 @@ TransformArray(T const& arr, F const& f)
}

} // dom

class DomCorpus;

/** Map a vector of strings to a @ref dom::Value object.

@param v The output parameter to receive the dom::Value.
@param elems The vector of T's to convert.
@param domCorpus The DomCorpus used to resolve references.
*/
template <typename T>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
std::vector<T> const& elems,
DomCorpus const* domCorpus)
{
v = dom::LazyArray(elems, domCorpus);
}

} // mrdocs


Expand Down
Loading
Loading