diff --git a/build-support/macros-and-definitions.cmake b/build-support/macros-and-definitions.cmake index a37f9425b..ef7984484 100644 --- a/build-support/macros-and-definitions.cmake +++ b/build-support/macros-and-definitions.cmake @@ -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 ) diff --git a/ns3 b/ns3 index d917f5ba3..2a9040749 100755 --- a/ns3 +++ b/ns3 @@ -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", diff --git a/utils/tests/gitlab-ci-doc.yml b/utils/tests/gitlab-ci-doc.yml index c7d5f7270..daf8cf4c4 100644 --- a/utils/tests/gitlab-ci-doc.yml +++ b/utils/tests/gitlab-ci-doc.yml @@ -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: