File tree Expand file tree Collapse file tree 3 files changed +37
-5
lines changed Expand file tree Collapse file tree 3 files changed +37
-5
lines changed Original file line number Diff line number Diff line change 70
70
# user input
71
71
DEBIAN_FRONTEND : noninteractive
72
72
run : |
73
- sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils dpkg-dev ccache
73
+ sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen
74
74
- name : Prepare ccache
75
75
uses : actions/cache@v2
76
76
with :
88
88
mkdir build
89
89
cd build
90
90
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++
91
+ - name : Check that doc task works
92
+ run : |
93
+ cd build
94
+ ninja doc
91
95
- name : Zero ccache stats and limit in size
92
96
run : ccache -z --max-size=500M
93
97
- name : Build with Ninja
Original file line number Diff line number Diff line change @@ -5,10 +5,26 @@ find_package(FLEX REQUIRED)
5
5
6
6
find_package (Doxygen )
7
7
if (DOXYGEN_FOUND )
8
- add_custom_target (doc
9
- "${DOXYGEN_EXECUTABLE} " "${CMAKE_CURRENT_SOURCE_DIR} /doxygen.cfg"
10
- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} "
11
- )
8
+ set (ROOT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR} /.." )
9
+ set (ROOT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR} /.." )
10
+ set (ORIGINAL_DOXYFILE "${CMAKE_CURRENT_SOURCE_DIR} /doxyfile" )
11
+ set (CONFIGURED_DOXYFILE "${ROOT_BINARY_DIR} /doxyfile" )
12
+ set (DOC_INPUT_DIRECTORY "${ROOT_SOURCE_DIR} /doc" )
13
+ set (DOC_OUTPUT_DIRECTORY "${ROOT_BINARY_DIR} /doc" )
14
+
15
+ configure_file ("${CMAKE_CURRENT_SOURCE_DIR} /doxyfile.override.in" "${CONFIGURED_DOXYFILE} " )
16
+ add_custom_target (doc
17
+ COMMAND "${CMAKE_COMMAND} " -E remove_directory "${DOC_OUTPUT_DIRECTORY} "
18
+ COMMAND "${CMAKE_COMMAND} " -E copy_directory "${DOC_INPUT_DIRECTORY} " "${DOC_OUTPUT_DIRECTORY} "
19
+ COMMAND "${DOXYGEN_EXECUTABLE} " "${CONFIGURED_DOXYFILE} "
20
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} " )
21
+
22
+ unset (DOC_OUTPUT_DIRECTORY )
23
+ unset (DOC_INPUT_DIRECTORY )
24
+ unset (CONFIGURED_DOXYFILE )
25
+ unset (ORIGINAL_DOXYFILE )
26
+ unset (ROOT_SOURCE_DIR )
27
+ unset (ROOT_BINARY_DIR )
12
28
endif (DOXYGEN_FOUND )
13
29
14
30
# Add a bison target named 'parser'.
Original file line number Diff line number Diff line change
1
+ # Overrides for cmake out of source builds specifically, we
2
+ # want to avoid copying files into the main doc directory,
3
+ # instead we should be generating the doxygen docs in our
4
+ # cmake output directory
5
+
6
+ # Note: This file is intended to be used with cmake
7
+ # configure_file; variables like @this@ are replaced by
8
+ # cmake variables.
9
+
10
+ @INCLUDE = @ORIGINAL_DOXYFILE@
11
+
12
+ OUTPUT_DIRECTORY = @DOC_OUTPUT_DIRECTORY@
You can’t perform that action at this time.
0 commit comments