Skip to content

Commit 48b4224

Browse files
committed
WIP
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 0ff98cb commit 48b4224

14 files changed

Lines changed: 4682 additions & 0 deletions

File tree

.github/workflows/website-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
-DBLAZE_TEST:BOOL=OFF
2323
-DBLAZE_CONFIGURATION:BOOL=OFF
2424
-DBLAZE_ALTERSCHEMA:BOOL=OFF
25+
-DBLAZE_DOCUMENTATION:BOOL=OFF
2526
-DBLAZE_TESTS:BOOL=OFF
2627
-DBLAZE_DOCS:BOOL=ON
2728
- run: cmake --build ./build --config Release --target doxygen

.github/workflows/website-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
-DBLAZE_TEST:BOOL=OFF
3434
-DBLAZE_CONFIGURATION:BOOL=OFF
3535
-DBLAZE_ALTERSCHEMA:BOOL=OFF
36+
-DBLAZE_DOCUMENTATION:BOOL=OFF
3637
-DBLAZE_TESTS:BOOL=OFF
3738
-DBLAZE_DOCS:BOOL=ON
3839
- run: cmake --build ./build --config Release --target doxygen

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ option(BLAZE_OUTPUT "Build the Blaze output formats library" ON)
1111
option(BLAZE_TEST "Build the Blaze test runner library" ON)
1212
option(BLAZE_CONFIGURATION "Build the Blaze configuration file library" ON)
1313
option(BLAZE_ALTERSCHEMA "Build the Blaze alterschema rule library" ON)
14+
option(BLAZE_DOCUMENTATION "Build the Blaze documentation generator library" ON)
1415
option(BLAZE_TESTS "Build the Blaze tests" OFF)
1516
option(BLAZE_BENCHMARK "Build the Blaze benchmarks" OFF)
1617
option(BLAZE_CONTRIB "Build the Blaze contrib programs" OFF)
@@ -67,6 +68,10 @@ if(BLAZE_ALTERSCHEMA)
6768
add_subdirectory(src/alterschema)
6869
endif()
6970

71+
if(BLAZE_DOCUMENTATION)
72+
add_subdirectory(src/documentation)
73+
endif()
74+
7075
if(BLAZE_CONTRIB)
7176
add_subdirectory(contrib)
7277
endif()
@@ -134,6 +139,10 @@ if(BLAZE_TESTS)
134139
add_subdirectory(test/alterschema)
135140
endif()
136141

142+
if(BLAZE_DOCUMENTATION)
143+
add_subdirectory(test/documentation)
144+
endif()
145+
137146
if(PROJECT_IS_TOP_LEVEL)
138147
# Otherwise we need the child project to link
139148
# against the sanitizers too.

config.cmake.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ if(NOT BLAZE_COMPONENTS)
1010
list(APPEND BLAZE_COMPONENTS test)
1111
list(APPEND BLAZE_COMPONENTS configuration)
1212
list(APPEND BLAZE_COMPONENTS alterschema)
13+
list(APPEND BLAZE_COMPONENTS documentation)
1314
endif()
1415

1516
include(CMakeFindDependencyMacro)
@@ -35,6 +36,8 @@ foreach(component ${BLAZE_COMPONENTS})
3536
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_compiler.cmake")
3637
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_output.cmake")
3738
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_alterschema.cmake")
39+
elseif(component STREQUAL "documentation")
40+
include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_blaze_documentation.cmake")
3841
else()
3942
message(FATAL_ERROR "Unknown Blaze component: ${component}")
4043
endif()

doxygen/index.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ CMake
7171
| `BLAZE_EVALUATOR` | Boolean | `ON` | Build the Blaze evaluator library |
7272
| `BLAZE_TEST` | Boolean | `ON` | Build the Blaze test runner library |
7373
| `BLAZE_ALTERSCHEMA` | Boolean | `ON` | Build the Blaze alterschema rule library|
74+
| `BLAZE_DOCUMENTATION` | Boolean | `ON` | Build the Blaze documentation library |
7475
| `BLAZE_TESTS` | Boolean | `OFF` | Build the Blaze tests |
7576
| `BLAZE_BENCHMARK` | Boolean | `OFF` | Build the Blaze benchmarks |
7677
| `BLAZE_CONTRIB` | Boolean | `OFF` | Build the Blaze contrib programs |

src/documentation/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
sourcemeta_library(NAMESPACE sourcemeta PROJECT blaze NAME documentation
2+
FOLDER "Blaze/Documentation"
3+
PRIVATE_HEADERS error.h
4+
SOURCES documentation.cc)
5+
6+
if(BLAZE_INSTALL)
7+
sourcemeta_library_install(NAMESPACE sourcemeta PROJECT blaze NAME documentation)
8+
endif()
9+
10+
target_link_libraries(sourcemeta_blaze_documentation PUBLIC
11+
sourcemeta::core::json)
12+
target_link_libraries(sourcemeta_blaze_documentation PUBLIC
13+
sourcemeta::core::jsonschema)
14+
target_link_libraries(sourcemeta_blaze_documentation PRIVATE
15+
sourcemeta::blaze::alterschema)

0 commit comments

Comments
 (0)