Skip to content

Commit 7670639

Browse files
committed
adopt antora and mrdocs
1 parent ecf6a14 commit 7670639

File tree

4 files changed

+62
-54
lines changed

4 files changed

+62
-54
lines changed

CMakeLists.txt

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Distributed under the Boost Software License, Version 1.0.
44
# https://www.boost.org/LICENSE_1_0.txt
55

6-
cmake_minimum_required(VERSION 3.5...3.20)
6+
cmake_minimum_required(VERSION 3.8...3.20)
77

88
project(boost_openmethod VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
99

@@ -12,9 +12,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
1212
set(BOOST_OPENMETHOD_IS_ROOT ON)
1313
endif()
1414

15-
if(BOOST_OPENMETHOD_IS_ROOT)
16-
include(CTest)
17-
endif()
1815
if(NOT BOOST_SUPERPROJECT_VERSION)
1916
option(BOOST_OPENMETHOD_INSTALL "Install boost::openmethod files" ON)
2017
option(BOOST_OPENMETHOD_BUILD_TESTS "Build boost::openmethod tests" ${BUILD_TESTING})
@@ -23,14 +20,26 @@ else()
2320
set(BOOST_OPENMETHOD_BUILD_TESTS ${BUILD_TESTING})
2421
endif()
2522

23+
option(BOOST_OPENMETHOD_MRDOCS_BUILD "Build the target for MrDocs: see mrdocs.yml" OFF)
24+
2625
if(BOOST_OPENMETHOD_IS_ROOT)
2726
#
2827
# Building inside Boost tree, but as a separate project e.g. on Travis or
2928
# other CI, or when producing Visual Studio Solution and Projects.
3029

31-
set(BOOST_INCLUDE_LIBRARIES openmethod)
30+
include(CTest)
31+
32+
set(
33+
BOOST_INCLUDE_LIBRARIES dynamic_bitset
34+
mp11
35+
preprocessor
36+
assert
37+
config
38+
core)
3239
set(BOOST_EXCLUDE_LIBRARIES openmethod)
33-
list(APPEND BOOST_INCLUDE_LIBRARIES test)
40+
if (NOT BOOST_OPENMETHOD_MRDOCS_BUILD)
41+
list(APPEND BOOST_INCLUDE_LIBRARIES test)
42+
endif()
3443
if(BOOST_OPENMETHOD_BUILD_EXAMPLES)
3544
# list(APPEND BOOST_INCLUDE_LIBRARIES optional)
3645
endif()
@@ -58,11 +67,13 @@ target_link_libraries(
5867
Boost::preprocessor
5968
)
6069

61-
if(BOOST_OPENMETHOD_BUILD_TESTS)
62-
enable_testing()
63-
add_subdirectory(test)
64-
endif()
70+
if (NOT BOOST_OPENMETHOD_MRDOCS_BUILD)
71+
if(BOOST_OPENMETHOD_BUILD_TESTS)
72+
enable_testing()
73+
add_subdirectory(test)
74+
endif()
6575

66-
if(BOOST_OPENMETHOD_BUILD_EXAMPLES)
67-
add_subdirectory(example)
76+
if(BOOST_OPENMETHOD_BUILD_EXAMPLES)
77+
add_subdirectory(example)
78+
endif()
6879
endif()

doc/antora.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ ext:
2424
files:
2525
- file: ./doc/tagfiles/boost-openmethod-doxygen.tag.xml
2626
base_url: 'xref:reference:'
27-
- file: ./doc/tagfiles/boost-system-doxygen.tag.xml
28-
base_url: https://www.boost.org/doc/libs/master/libs/system/doc/html/
29-
- file: ./doc/tagfiles/boost-core-doxygen.tag.xml
30-
base_url: https://www.boost.org/doc/libs/master/libs/core/doc/html/
31-
- file: ./doc/tagfiles/boost-filesystem-doxygen.tag.xml
32-
base_url: https://www.boost.org/doc/libs/master/libs/filesystem/doc/
3327
using-namespaces:
3428
- boost::openmethod
3529
- boost::openmethod::policies

doc/mrdocs.yml

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,55 @@ input:
66
# Patterns to filter out the source-files in the directories
77
file-patterns:
88
- '*.hpp'
9-
exclude:
10-
- '../include/boost/url/impl'
11-
- '../include/boost/url/grammar/impl'
12-
- '../include/boost/url/rfc/impl'
9+
# exclude:
10+
# - '../boost/libs/test'
11+
# - '../include/boost/test/impl'
1312

1413
# Filters
1514
include-symbols:
16-
- 'boost::urls::**'
17-
see-below:
18-
- 'boost::urls::format_arg'
19-
- 'boost::urls::named_arg'
20-
- 'boost::urls::see_below'
21-
- 'boost::urls::*_t'
22-
- 'boost::urls::grammar::see_below'
23-
- 'boost::urls::string_token::see_below'
24-
- 'boost::urls::decode_view::iterator'
25-
- 'boost::urls::params_base::iterator'
26-
- 'boost::urls::params_encoded_base::iterator'
27-
- 'boost::urls::segments_base::iterator'
28-
- 'boost::urls::segments_encoded_base::iterator'
29-
implementation-defined:
30-
- 'boost::urls::detail'
31-
- 'boost::urls::**::detail'
32-
- 'boost::urls::*_unsafe'
33-
- 'boost::urls::make_error_code'
34-
- 'boost::urls::make_void'
35-
- 'boost::urls::implementation_defined'
36-
- 'boost::urls::grammar::implementation_defined'
37-
- 'boost::urls::string_token::implementation_defined'
38-
- 'boost::urls::grammar::*_t'
39-
- 'boost::urls::grammar::make_error_*'
40-
- 'boost::urls::grammar::operator_*'
41-
- 'boost::urls::string_token::*_t'
42-
exclude-symbols:
43-
- 'boost::urls::void_t'
15+
- 'boost::openmethod::**'
16+
# see-below:
17+
# - 'boost::urls::format_arg'
18+
# - 'boost::urls::named_arg'
19+
# - 'boost::urls::see_below'
20+
# - 'boost::urls::*_t'
21+
# - 'boost::urls::grammar::see_below'
22+
# - 'boost::urls::string_token::see_below'
23+
# - 'boost::urls::decode_view::iterator'
24+
# - 'boost::urls::params_base::iterator'
25+
# - 'boost::urls::params_encoded_base::iterator'
26+
# - 'boost::urls::segments_base::iterator'
27+
# - 'boost::urls::segments_encoded_base::iterator'
28+
# implementation-defined:
29+
# - 'boost::urls::detail'
30+
# - 'boost::urls::**::detail'
31+
# - 'boost::urls::*_unsafe'
32+
# - 'boost::urls::make_error_code'
33+
# - 'boost::urls::make_void'
34+
# - 'boost::urls::implementation_defined'
35+
# - 'boost::urls::grammar::implementation_defined'
36+
# - 'boost::urls::string_token::implementation_defined'
37+
# - 'boost::urls::grammar::*_t'
38+
# - 'boost::urls::grammar::make_error_*'
39+
# - 'boost::urls::grammar::operator_*'
40+
# - 'boost::urls::string_token::*_t'
41+
# exclude-symbols:
42+
# - 'boost::urls::void_t'
4443

4544
# Metadata Extraction
4645
private-bases: false
4746

4847
# Generator
4948
generate: adoc
50-
base-url: https://www.github.com/boostorg/url/blob/develop/ # boost/url/url_view.hpp
49+
base-url: https://www.github.com/boostorg/openmethod/blob/develop/ # boost/url/url_view.hpp
5150

5251
# Style
5352
verbose: true
5453
multipage: true
5554

5655
# The target for MrDocs simply includes all symbols defined in all
5756
# headers with the appropriate compilation options.
58-
# Nothing else should be included in the MrDocs configuration or
57+
# Nothing else should be included in the MrDocs configuration or
5958
# would be useful to MrDocs.
6059
#
6160
# This single source file not only includes all symbols (the source
@@ -75,4 +74,4 @@ multipage: true
7574
# The other options are set just to ensure other targets are
7675
# ignored even if these options are set as ON in the cache.
7776
#
78-
cmake: '-D BOOST_URL_MRDOCS_BUILD=ON -D CMAKE_CXX_STANDARD=20 -D BOOST_URL_BUILD_FUZZERS=OFF -D BOOST_URL_BUILD_EXAMPLES=OFF -D BOOST_URL_BUILD_TESTS=OFF -D BUILD_TESTING=OFF'
77+
cmake: '-D BOOST_OPENMETHOD_MRDOCS_BUILD=ON -D CMAKE_CXX_STANDARD=20 -D BOOST_OPENMETHOD_BUILD_EXAMPLES=OFF -D BOOST_OPENMETHOD_BUILD_TESTS=OFF -D BUILD_TESTING=OFF'

include/boost/openmethod/core.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ namespace boost::openmethod {
3737
template<class Registry, class Class>
3838
constexpr bool is_polymorphic = Registry::rtti::template is_polymorphic<Class>;
3939

40+
/** A virtual_ptr.
41+
*/
42+
43+
4044
template<
4145
class Class, class Registry = BOOST_OPENMETHOD_DEFAULT_REGISTRY,
42-
typename = void>
46+
typename Void = void>
4347
class virtual_ptr;
4448

4549
// =============================================================================

0 commit comments

Comments
 (0)