doc: ci: check for trailing white space in generated introspected-x.h

This commit is contained in:
Tommaso Pecorella
2022-08-25 10:59:41 +02:00
committed by Tommaso Pecorella
parent 749eaf3763
commit 57347ec7e6
3 changed files with 11 additions and 6 deletions

View File

@@ -921,20 +921,21 @@ macro(process_options)
)
file(
WRITE ${PROJECT_SOURCE_DIR}/doc/introspected-command-line.h
WRITE ${CMAKE_BINARY_DIR}/introspected-command-line-preamble.h
"/* This file is automatically generated by
CommandLine::PrintDoxygenUsage() from the CommandLine configuration
in various example programs. Do not edit this file! Edit the
CommandLine configuration in those files instead.
*/
\n"
*/\n"
)
add_custom_target(
assemble-introspected-command-line
# works on CMake 3.18 or newer > COMMAND ${CMAKE_COMMAND} -E cat
# ${PROJECT_SOURCE_DIR}/testpy-output/*.command-line >
# ${PROJECT_SOURCE_DIR}/doc/introspected-command-line.h
COMMAND ${cat_command} ${PROJECT_SOURCE_DIR}/testpy-output/*.command-line
COMMAND ${cat_command}
${CMAKE_BINARY_DIR}/introspected-command-line-preamble.h
${PROJECT_SOURCE_DIR}/testpy-output/*.command-line
> ${PROJECT_SOURCE_DIR}/doc/introspected-command-line.h 2> NULL
DEPENDS run-introspected-command-line
)

3
ns3
View File

@@ -920,7 +920,8 @@ def build_step(args,
# If we are building specific targets, we build them one by one
if "build" in args:
non_executable_targets = ["check-version",
non_executable_targets = ["assemble-introspected-command-line",
"check-version",
"cmake-format",
"docs",
"doxygen",

View File

@@ -7,7 +7,6 @@
- pacman-key --init
- pacman -Syu --noconfirm
base-devel ninja cmake python ccache gsl gtk3 boost
git
doxygen graphviz imagemagick dia texlive-core texlive-bin texlive-latexextra python-sphinx
# no policy is a good policy.
- mv /etc/ImageMagick-7/policy.xml /etc/ImageMagick-7/policy.xml.bak
@@ -27,6 +26,7 @@ doxygen:
- export CCACHE_DIR=${PWD}/$CCACHE_BASEDIR_VALUE
- CXX=$COMPILER ./ns3 configure --enable-examples --enable-tests --enable-asserts -d default
- ./ns3 build
- ./ns3 build assemble-introspected-command-line
# - mkdir -p public/doxygen
# The following four lines were needed when ns-3 had warnings, and
# it was necessary to have a filter to check only the files tocuhed by a MR.
@@ -35,6 +35,9 @@ doxygen:
# - export CHANGED_FILES=$(git diff --name-only ns-3-origin/master --diff-filter=d | tr '\n' ' ' | sed 's/ $//g;s/ /\\\|/g')
# - doc/doxygen.warnings.report.sh -f "$CHANGED_FILES"
- doc/doxygen.warnings.report.sh
# Just need to check doc/introspected-command-line.h and doc/introspected-doxygen.h
- python3 utils/trim-trailing-whitespace.py --check doc/introspected-doxygen.h
- python3 utils/trim-trailing-whitespace.py --check doc/introspected-command-line.h
# - doxygen doc/doxygen.conf
# - mv doc/html/ public/doxygen
cache: