diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-13 03:36:05 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-13 03:36:05 +0000 |
| commit | 6c3b338ffa67fc7e3a62b0f84c16f3fba358fa09 (patch) | |
| tree | e3f12a8ca9e241e0de0f6627cf67e0cd75486796 /CMakeLists.txt | |
| parent | e591f33cc53e78fe4205cf7b0d6b228557af82a7 (diff) | |
build: add optional doc target for the cpsc man page
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3352c47..b230fe5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,3 +42,14 @@ target_link_libraries(cpsc CPSLexer ${llvm_libs} ) + +add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cpsc.1" + COMMAND pandoc --standalone --from=markdown --to=man + "${CMAKE_CURRENT_SOURCE_DIR}/doc/cpsc.md" + --output "${CMAKE_CURRENT_BINARY_DIR}/cpsc.1" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/doc/cpsc.md" + COMMENT "Generating cpsc(1) manual" + VERBATIM +) +add_custom_target(doc DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/cpsc.1") |
