diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b8af7c62394cb7638ae10dce96cb8cf48d81396f..9440f482fce2f10c47bdd3d5ce1c30fa8cf7f82f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,9 +45,15 @@ versiondocs: - hugo version - mkdir build - cd build - - time cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_PREFIX_PATH=$QTCMAKE + - ls ../hugo/static/py + - ls ../hugo/public/py + - time cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_PREFIX_PATH=$QTCMAKE -DBATCH_MODE=ON - time make -j8 + - ls ../hugo/static/py + - ls ../hugo/public/py - time make -j8 webdoc + - ls ../hugo/static/py + - ls ../hugo/public/py - rm -rf ~www/ba/git-main/hugo-public - cp -r ../hugo/public ~www/ba/git-main/hugo-public diff --git a/Base/CMakeLists.txt b/Base/CMakeLists.txt index 172f74d8d902fb0d19fe965c6e0a0c9aaf6aa3a3..e0b6ad1e1bbd0b7d7ef9c0bd3b478444f53aaa5c 100644 --- a/Base/CMakeLists.txt +++ b/Base/CMakeLists.txt @@ -18,6 +18,9 @@ set_target_properties(${lib} PROPERTIES SOURCE_FILES "${source_files}" INCLUDE_FILES "${include_files}" EMBED_PYTHON ${BORNAGAIN_PYTHON}) +if(BATCH_MODE) + target_compile_definitions(${lib} PRIVATE SILENT_PROGRESS=ON) +endif() # --- make the library --- MakeLib(${lib}) diff --git a/CMakeLists.txt b/CMakeLists.txt index 337fe1e4460da4e200e80e82fc5d7e27d72fb62f..aecd76d3ce5d96e0b02bb06466a716c5c3606b1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ option(DEV "Development: turns ALLCONFIG, ZERO_TOLERANCE, DEVELOPER_CHECKS on" O option(BA_COVERAGE "Build with test coverage information" OFF) option(BA_DEBUG_OPTIMIZATION "Build with debug optimization (gcc only)" OFF) option(BA_TIDY "Invokes clang-tidy" OFF) +option(BATCH_MODE "Suppress some output" OFF) option(ALGORITHM_DIAGNOSTIC "Let some algorithms set diagnostic variables" OFF) option(BA_PY_PACKAGE "Build a Python wheel with the default Python platform, or a given Python platform (via BA_PY_PLATFORM)" OFF) set(BA_PY_PLATFORM "" CACHE INTERNAL "Path to Python platform to build a Python package") diff --git a/Sim/Simulation/ISimulation.cpp b/Sim/Simulation/ISimulation.cpp index 3b60b1be3decf5d237e6fbc01aef7b4ff22b7efb..ca7fb9c1ca8a1c9f4739109622fff35bb637d274 100644 --- a/Sim/Simulation/ISimulation.cpp +++ b/Sim/Simulation/ISimulation.cpp @@ -95,6 +95,7 @@ void ISimulation::subscribe(const std::function<bool(size_t)>& inform) //! Initializes a progress monitor that prints to stdout. void ISimulation::setTerminalProgressMonitor() { +#ifndef SILENT_PROGRESS subscribe([](size_t percentage_done) -> bool { if (percentage_done < 100) std::cout << std::setprecision(2) << "\r... " << percentage_done << "%" << std::flush; @@ -102,6 +103,7 @@ void ISimulation::setTerminalProgressMonitor() std::cout << "\r... 100%\n"; return true; }); +#endif } const SimulationOptions& ISimulation::options() const diff --git a/hugo/layouts/shortcodes/highlightfile.html b/hugo/layouts/shortcodes/highlightfile.html index 067e23f1d3b14fbfc1bac34acad701535914a3af..0c984befdf4362e8fdc247b8f0cb57c1dd49052e 100644 --- a/hugo/layouts/shortcodes/highlightfile.html +++ b/hugo/layouts/shortcodes/highlightfile.html @@ -2,14 +2,11 @@ Highlights file and provides download link. Argument 1 = File path below /src/ --> - -{{- $src := (.Get "file") -}} +{{- $src := (.Get "file") }} {{- $lang := .Get "language" | default ("python") }} {{- $opt := .Get "opt" | default ("linenos=table") }} - -{{ $path := (printf "/static/py/auto/%s" $src) }} -{{ $file := $path | readFile }} -{{ highlight (print $file) $lang $opt}} - +{{- $path := (printf "/static/py/auto/%s" $src) }} +{{- $file := $path | readFile }} +{{- highlight (print $file) $lang $opt }} <a class="linktofile" href="{{.Site.Params.url_blob}}/auto/{{(printf $src)}}"/>{{$src}}</a>