Skip to content

Commit f746ec6

Browse files
committed
Pushing some changes for basic doxygen file setup.
1 parent 467ffa6 commit f746ec6

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
1414
include_directories(src)
1515
include_directories(test)
1616
add_subdirectory(test)
17+
add_subdirectory(doc)
1718

doc/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# add a target to generate API documentation with Doxygen
2+
find_package(Doxygen)
3+
option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" ${DOXYGEN_FOUND})
4+
5+
if(BUILD_DOCUMENTATION)
6+
if(NOT DOXYGEN_FOUND)
7+
message(FATAL_ERROR "Doxygen is needed to build the documentation.")
8+
endif()
9+
10+
set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
11+
set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
12+
13+
configure_file(${doxyfile_in} ${doxyfile} @ONLY)
14+
15+
add_custom_target(doc
16+
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
17+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
18+
COMMENT "Generating API documentation with Doxygen"
19+
VERBATIM)
20+
21+
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc)
22+
endif()

doc/Doxyfile.in

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
PROJECT_NAME = "@CMAKE_PROJECT_NAME@"
2+
PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
3+
STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ \
4+
@PROJECT_BINARY_DIR@
5+
INPUT = @doxy_main_page@ \
6+
@PROJECT_SOURCE_DIR@ \
7+
@PROJECT_BINARY_DIR@
8+
FILE_PATTERNS = *.h \
9+
*.cc
10+
RECURSIVE = YES
11+
USE_MDFILE_AS_MAINPAGE = @doxy_main_page@

src/dbc.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,11 @@ std::istream & getline( std::istream & stream, std::string & line ) {
3434

3535
}
3636

37+
38+
namespace dbc {
39+
40+
class parser {
41+
42+
}
43+
44+
}

0 commit comments

Comments
 (0)