Skip to content

Commit d98e691

Browse files
committed
[doc] switch to core's doc infrastructure
1 parent 9065041 commit d98e691

11 files changed

+40
-534
lines changed

build_system/biocpp_io-config-version.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ find_path (BIOCPP_IO_INCLUDE_DIR NAMES bio/io.hpp HINTS "${BIOCPP_IO_CLONE_DIR}/
2020
file(STRINGS "${BIOCPP_IO_INCLUDE_DIR}/bio/io.hpp" BIOCPP_IO_LIBRARY_HEADER REGEX "#define BIOCPP_IO_VERSION_(MAJOR|MINOR|PATCH)")
2121
string(REGEX REPLACE "#define BIOCPP_IO_VERSION_(MAJOR|MINOR|PATCH) " "" PACKAGE_VERSION "${BIOCPP_IO_LIBRARY_HEADER}")
2222
string(REGEX REPLACE ";" "." PACKAGE_VERSION "${PACKAGE_VERSION}")
23+
set(BIOCPP_IO_VERSION ${PACKAGE_VERSION} CACHE STRING "Version of the I/O library")
2324

2425
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
2526
set(PACKAGE_VERSION_COMPATIBLE FALSE)

doc/main_page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Welcome {#mainpage}
1+
# Welcome {#io_mainpage}
22

33
Welcome to the documentation of the BioC++ I/O library.
44
This web-site contains the API reference (documentation of our interfaces) and some small Tutorials and HowTos.

test/documentation/CMakeLists.txt

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
# Minimum cmake version
22
cmake_minimum_required(VERSION 3.7)
33

4-
### Get our version and directories
4+
## Setup I/O library
55
include (../../build_system/biocpp_io-config-version.cmake)
6-
set (BIOCPP_IO_VERSION "${PACKAGE_VERSION}")
76

87
project (biocpp_io_doc LANGUAGES NONE VERSION "${BIOCPP_IO_VERSION}")
98

10-
if (NOT EXISTS "${BIOCPP_IO_INCLUDE_DIR}/bio/io.hpp")
11-
message (FATAL_ERROR "Could not find the BioC++ I/O library. Not building documentation.")
9+
if (NOT IS_DIRECTORY "${BIOCPP_IO_CLONE_DIR}/doc")
10+
message (FATAL_ERROR "Could not find BioC++ I/O library. Not building documentation.")
1211
endif ()
13-
message (STATUS "Found BioC++ I/O library: ${BIOCPP_IO_INCLUDE_DIR} (${BIOCPP_IO_VERSION})")
12+
message (STATUS "BioC++ I/O library: ${BIOCPP_IO_CLONE_DIR} (${BIOCPP_IO_VERSION})")
1413

15-
### Get core's version and directories
14+
### Find core infrastructure which is needed and core content which is optional
1615
include(../biocpp_require_core_infrastructure.cmake)
17-
biocpp_require_core_infrastructure(FALSE)
16+
biocpp_require_core_infrastructure(FALSE) # false means that find_package is not called
1817

19-
set (BIOCPP_IO_DOXYGEN_INPUT_DIR "${CMAKE_SOURCE_DIR}")
18+
if (NOT IS_DIRECTORY "${BIOCPP_CORE_CLONE_DIR}/doc")
19+
message (FATAL_ERROR "Could not find BioC++ Core. Not building documentation.")
20+
endif ()
21+
message (STATUS "BioC++ Core library: ${BIOCPP_CORE_CLONE_DIR} (${BIOCPP_CORE_VERSION})")
2022

21-
#TODO: use the .cmake file from the core repo and remove this one
22-
#TODO: also just use the doxygen_cfg.in if possible
23-
include (bio-doxygen.cmake)
23+
## Configure documentation build
24+
option(BIOCPP_DOXY_CORE "Build documentation for core module." ON)
25+
option(BIOCPP_DOXY_IO "Build documentation for core module." ON)
2426

25-
enable_testing ()
27+
if (BIOCPP_DOXY_CORE)
28+
include (${BIOCPP_CORE_CLONE_DIR}/test/documentation/biocpp-doxygen-module.cmake)
29+
endif()
2630

27-
if (BIOCPP_IO_USER_DOC)
28-
add_subdirectory(doc_usr)
29-
endif ()
31+
if (BIOCPP_DOXY_IO)
32+
include (bio-doxygen-module.cmake)
33+
endif()
3034

31-
if (BIOCPP_IO_DEV_DOC)
32-
add_subdirectory(doc_dev)
33-
endif ()
35+
include (${BIOCPP_CORE_CLONE_DIR}/test/documentation/biocpp-doxygen.cmake)

test/documentation/DoxygenLayout.xml

Lines changed: 0 additions & 232 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<tab type="usergroup" visible="yes" title="Record-based I/O" intro="">
2+
<tab type="user" visible="yes" title="Introduction" url="\ref record_based_intro" intro=""/>
3+
<tab type="user" visible="yes" title="Record FAQ" url="\ref record_faq" intro=""/>
4+
</tab>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required (VERSION 3.7)
2+
3+
LIST(APPEND BIOCPP_DOXYGEN_MODULE_LAYOUT ${BIOCPP_IO_CLONE_DIR}/test/documentation/DoxygenLayout.xml.module)
4+
5+
set (BIOCPP_DOXYGEN_INCLUDE_PATH "${BIOCPP_DOXYGEN_INCLUDE_PATH} ${BIOCPP_IO_INCLUDE_DIR}")
6+
7+
set (BIOCPP_DOXYGEN_INPUT "${BIOCPP_DOXYGEN_INPUT} \
8+
${BIOCPP_IO_CLONE_DIR}/include \
9+
${BIOCPP_IO_CLONE_DIR}/doc \
10+
${BIOCPP_IO_CLONE_DIR}/CHANGELOG.md")
11+
12+
set (BIOCPP_DOXYGEN_EXAMPLE_PATH "${BIOCPP_DOXYGEN_EXAMPLE_PATH} ${BIOCPP_IO_CLONE_DIR}")
13+
14+
set(BIOCPP_VERSION "${BIOCPP_VERSION} io-${BIOCPP_IO_VERSION}")

test/documentation/bio-doxygen.cmake

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)