Release version 1.0.0; keep generated documentation source-derived
The project version moves to 1.0.0, which the library soname, the reported version, the test expectations, and the generated document filename all derive from. SOVERSION now matches the major version. The generated reference is built from the source and its documentation comments alone. Prose from docs/ was briefly part of the input and is removed: development notes are written and read on their own, and a generator that reproduces them adds nothing. The reference opens on a front page declared in the public header, followed by the module contract. One target builds it. Both PDF and HTML are produced by default, the finished documents land in the build tree under docs/pdf and docs/html, and the generators work in docs/tmp. The internal namespace is dpm_core, matching the artifact name as closely as a C++ identifier permits.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(dpm-core VERSION 0.1.0 LANGUAGES CXX)
|
||||
project(dpm-core VERSION 1.0.0 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
@@ -159,7 +159,7 @@ set_tests_properties(cli_rejects_invalid_module PROPERTIES WILL_FAIL TRUE)
|
||||
# ---------------------------------------------------------------------
|
||||
# Code reference (Doxygen) — optional 'docs' target
|
||||
# ---------------------------------------------------------------------
|
||||
option(DPM_DOCS_HTML "Generate the code reference in HTML" OFF)
|
||||
option(DPM_DOCS_HTML "Generate the code reference in HTML" ON)
|
||||
option(DPM_DOCS_PDF "Generate the code reference as PDF (requires LaTeX)" ON)
|
||||
|
||||
find_package(Doxygen)
|
||||
@@ -188,22 +188,18 @@ if(DOXYGEN_FOUND)
|
||||
set(DOXYGEN_GENERATE_LATEX NO)
|
||||
endif()
|
||||
|
||||
# OVERVIEW.md becomes the reference's front page, so the generated
|
||||
# document opens on the project description instead of a bare index.
|
||||
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE ${CMAKE_CURRENT_SOURCE_DIR}/docs/OVERVIEW.md)
|
||||
|
||||
doxygen_add_docs(docs-generate
|
||||
# The reference is generated from the source and its documentation
|
||||
# comments. The markdown in docs/ is written and read on its own and
|
||||
# stays out of the input.
|
||||
# One target, so `cmake --build <dir> --target docs` is the whole
|
||||
# procedure and the IDE lists a single entry for it. The commands
|
||||
# below run after Doxygen and place the finished documents.
|
||||
doxygen_add_docs(docs
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/docs
|
||||
COMMENT "Generating code reference with Doxygen"
|
||||
COMMENT "Generating the code reference with Doxygen"
|
||||
)
|
||||
|
||||
# The one target a user builds. Everything below hangs off it, so
|
||||
# `cmake --build <dir> --target docs` produces finished documents.
|
||||
add_custom_target(docs COMMENT "Building the code reference")
|
||||
add_dependencies(docs docs-generate)
|
||||
|
||||
if(DPM_DOCS_PDF)
|
||||
find_program(PDFLATEX_EXECUTABLE pdflatex)
|
||||
if(PDFLATEX_EXECUTABLE)
|
||||
|
||||
Reference in New Issue
Block a user