Skip to content

Commit

Permalink
chore: rename docs related cmake targets to use dash naming convention
Browse files Browse the repository at this point in the history
Signed-off-by: msclock <msclock@qq.com>
  • Loading branch information
msclock committed Dec 1, 2023
1 parent c5192b6 commit 95ace5e
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions cmake/ConfigureCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ add_code_coverage_all_targets(
${VCPKG_INSTALLED_DIR}/*
${CMAKE_BINARY_DIR}/*
/usr/*
HTML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}_docs/coverage)
HTML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-docs/coverage)
# cmake-format: on

if(TARGET ${CMAKE_PROJECT_NAME}_docs)
add_dependencies(ccov-all ${CMAKE_PROJECT_NAME}_docs)
if(TARGET ${CMAKE_PROJECT_NAME}-docs)
add_dependencies(ccov-all ${CMAKE_PROJECT_NAME}-docs)
endif()
14 changes: 7 additions & 7 deletions cmake/ConfigureDocs.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the target by issuing: cmake --build . --target
# ${CMAKE_PROJECT_NAME}_docs
# ${CMAKE_PROJECT_NAME}-docs

include(cmake-modules/configure/ConfigDoxygen)
configdoxygen()
Expand All @@ -12,23 +12,23 @@ if(DOXYGEN_FOUND)

# cmake-format: off
doxygen_add_docs(
${CMAKE_PROJECT_NAME}_doxygen
${CMAKE_PROJECT_NAME}-doxygen
"${CMAKE_BINARY_DIR}/git/include"
"${CMAKE_BINARY_DIR}/compile/include"
"${CMAKE_BINARY_DIR}/src/compile/include"
"${PROJECT_SOURCE_DIR}/src/compile/include"
"${PROJECT_SOURCE_DIR}/src/executable/include"
"${PROJECT_SOURCE_DIR}/src/header_only/include"
COMMENT "gen doxygen style docs automatically")
# cmake-format: on

if(TARGET ${CMAKE_PROJECT_NAME}_doxygen)
if(TARGET ${CMAKE_PROJECT_NAME}-doxygen)
list(APPEND CMAKE_MODULE_PATH "${cmake-modules_MODULE_PATH}/configure")
find_package(Sphinx REQUIRED breathe)

sphinx_add_docs(
${CMAKE_PROJECT_NAME}_docs
${CMAKE_PROJECT_NAME}-docs
BREATHE_PROJECTS
${CMAKE_PROJECT_NAME}_doxygen
${CMAKE_PROJECT_NAME}-doxygen
BUILDER
html
BREATH_DEBUG
Expand All @@ -38,6 +38,6 @@ if(DOXYGEN_FOUND)
SOURCE_DIRECTORY
docs
OUTPUT_DIRECTORY
${CMAKE_PROJECT_NAME}_docs)
${CMAKE_PROJECT_NAME}-docs)
endif()
endif()
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
This documentation was generated by Doxygen + Breathe

```{doxygenindex}
:project: ss-cpp_doxygen
:project: ss-cpp-doxygen
```
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# -- Project information -----------------------------------------------------

project = "SS Cpp"
project = "Serious Scaffold Cpp"
copyright = "2022-2023 Serious Scaffold"
author = "msclock"

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Welcome to SS Cpp's documentation
# Welcome to Serious Scaffold Cpp's documentation

```{toctree}
:hidden:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
This documentation was generated by Doxygen + Breathe

```{doxygenindex}
:project: {{ repo_name }}_doxygen
:project: {{ repo_name }}-doxygen
```
6 changes: 3 additions & 3 deletions template/cmake/ConfigureCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ add_code_coverage_all_targets(
${VCPKG_INSTALLED_DIR}/*
${CMAKE_BINARY_DIR}/*
/usr/*
HTML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}_docs/coverage)
HTML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-docs/coverage)
# cmake-format: on

if(TARGET ${CMAKE_PROJECT_NAME}_docs)
add_dependencies(ccov-all ${CMAKE_PROJECT_NAME}_docs)
if(TARGET ${CMAKE_PROJECT_NAME}-docs)
add_dependencies(ccov-all ${CMAKE_PROJECT_NAME}-docs)
endif()
14 changes: 7 additions & 7 deletions template/cmake/ConfigureDocs.cmake.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the target by issuing: cmake --build . --target
# ${CMAKE_PROJECT_NAME}_docs
# ${CMAKE_PROJECT_NAME}-docs

include(cmake-modules/configure/ConfigDoxygen)
configdoxygen()
Expand All @@ -12,10 +12,10 @@ if(DOXYGEN_FOUND)

# cmake-format: off
doxygen_add_docs(
${CMAKE_PROJECT_NAME}_doxygen
${CMAKE_PROJECT_NAME}-doxygen
"${CMAKE_BINARY_DIR}/git/include"
[%- if add_compile_target == true %]
"${CMAKE_BINARY_DIR}/compile/include"
"${CMAKE_BINARY_DIR}/src/compile/include"
"${PROJECT_SOURCE_DIR}/src/compile/include"
[%- endif %]
[%- if add_executable_target == true %]
Expand All @@ -27,14 +27,14 @@ if(DOXYGEN_FOUND)
COMMENT "gen doxygen style docs automatically")
# cmake-format: on

if(TARGET ${CMAKE_PROJECT_NAME}_doxygen)
if(TARGET ${CMAKE_PROJECT_NAME}-doxygen)
list(APPEND CMAKE_MODULE_PATH "${cmake-modules_MODULE_PATH}/configure")
find_package(Sphinx REQUIRED breathe)

sphinx_add_docs(
${CMAKE_PROJECT_NAME}_docs
${CMAKE_PROJECT_NAME}-docs
BREATHE_PROJECTS
${CMAKE_PROJECT_NAME}_doxygen
${CMAKE_PROJECT_NAME}-doxygen
BUILDER
html
BREATH_DEBUG
Expand All @@ -44,6 +44,6 @@ if(DOXYGEN_FOUND)
SOURCE_DIRECTORY
docs
OUTPUT_DIRECTORY
${CMAKE_PROJECT_NAME}_docs)
${CMAKE_PROJECT_NAME}-docs)
endif()
endif()

0 comments on commit 95ace5e

Please sign in to comment.