Fixed make error
This commit is contained in:
1 parent
684e05109d
commit
37bd700564
6 files changed
+27
-34
No files matched your search
@@ -28,7 +28,7 @@ Builds the release validation scope inside the prebuilt Docker image:
|
||||
|
||||
Options:
|
||||
--docker-image IMAGE Docker image name to use/build/delete
|
||||
(default: legatus-qt6-prebuilt:latest)
|
||||
(default: legatus-qt6:1.0)
|
||||
--build-prebuilt-image Build the prebuilt Docker image (from ./Dockerfile)
|
||||
and exit. To run the build with it, run the script
|
||||
again with --docker-image
|
||||
@@ -276,20 +276,12 @@ build_prebuilt_image() {
|
||||
|
||||
require_command docker
|
||||
|
||||
# MIGRATE_PIPELINE_ROOT resolution (highest precedence first):
|
||||
# 1. exported environment variable (e.g. from a Jenkinsfile)
|
||||
# 2. .envrc in this directory (if present)
|
||||
# 3. derived from this script's location - the script always lives at
|
||||
# <root>/qt-migration-legatus/qt6-after/qt6-migrated-legatus, so the
|
||||
# pipeline root is three levels up. This makes the script work in a
|
||||
# fresh Jenkins checkout with no environment setup at all.
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
MIGRATE_PIPELINE_ROOT_DEFAULT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
||||
PIPELINE_ROOT_EXPORTED="${MIGRATE_PIPELINE_ROOT:-}"
|
||||
|
||||
if [[ -f ".envrc" ]]; then
|
||||
set -a
|
||||
# shellcheck disable=SC1091
|
||||
source ".envrc"
|
||||
set +a
|
||||
fi
|
||||
@@ -394,7 +386,7 @@ if [[ "${RUN_COVERAGE}" == "ON" && "${RUN_JENKINS_BUILDER}" == "ON" ]]; then
|
||||
fi
|
||||
|
||||
# Default for the Docker image name
|
||||
DOCKER_IMAGE="${DOCKER_IMAGE:-legatus-qt6-prebuilt:latest}"
|
||||
DOCKER_IMAGE="${DOCKER_IMAGE:-legatus-qt6:1.0}"
|
||||
|
||||
# Export variables for Docker container
|
||||
export RELEASE_BUILD RUN_CTEST BUILD_PREBUILT_IMAGE DELETE_PREBUILT_IMAGE DOCKER_IMAGE RUN_JENKINS_BUILDER PACKAGE_OUTPUT_DIR RUN_COVERAGE COVERAGE_OUTPUT_DIR LTS_VERSION PROJECT GUEZ_MODE BUILD_NUMBER BUILD_TAG
|
||||
@@ -488,17 +480,8 @@ rm -rf build4
|
||||
mkdir -p build4
|
||||
cd build4
|
||||
|
||||
# RELEASE_BUILD=ON selects the release scope (TetraIF, Z/src, Lts/Common +
|
||||
# TrainingAreaBase); all other BUILD_* flags are left at their CMake defaults.
|
||||
COV_CMAKE_ARGS=()
|
||||
if [[ "${RUN_COVERAGE}" == "ON" ]]; then
|
||||
# Instrument the Release build with gcov. CMAKE_<LANG>_FLAGS_RELEASE replaces
|
||||
# the default "-O3 -DNDEBUG" entirely, so -O0/--coverage must be carried
|
||||
# there (plain CMAKE_<LANG>_FLAGS would come first on the command line and
|
||||
# lose to -O3); -DNDEBUG is kept so behavior matches the standard build.
|
||||
# -fPIC: plain static libs (e.g. tabTelegrams) are not PIC by default and
|
||||
# are linked into shared libraries - at -O0 the non-PIC relocations show up
|
||||
# at link time. Never add USE_IPO/USE_UNITY_BUILD here - LTO breaks gcov.
|
||||
COV_CMAKE_ARGS=(
|
||||
"-DCMAKE_C_FLAGS_RELEASE=-O0 -g --coverage -DNDEBUG -fPIC"
|
||||
"-DCMAKE_CXX_FLAGS_RELEASE=-O0 -g --coverage -DNDEBUG -fPIC"
|
||||
@@ -529,21 +512,12 @@ else
|
||||
log_info "Skipping CTest"
|
||||
fi
|
||||
|
||||
# Code coverage (lcov): capture, filter to the release scope and generate the
|
||||
# HTML report. Runs only in --run-coverage mode, after ctest (so the .gcda
|
||||
# data files exist). cwd is build4, so --directory . is the build tree; all
|
||||
# artifacts are written via absolute paths.
|
||||
if [[ "${RUN_COVERAGE}" == "ON" ]]; then
|
||||
log_info "=== Code coverage (lcov) ==="
|
||||
COVOUT=/workspace/coverage-out
|
||||
SRCROOT=/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus
|
||||
mkdir -p "${COVOUT}"
|
||||
|
||||
# GCC 15 + lcov 2.x: the branch data (libstdc++, Qt headers and some of
|
||||
# our sources) trips lcov's consistency checks (mismatch / inconsistent),
|
||||
# and a filter pattern that matches no file is an "unused" error. The
|
||||
# extract step below keeps only the release scope, so these quirks do not
|
||||
# affect the report - ignore those error classes on every step.
|
||||
|
||||
COV_IGNORE=(--ignore-errors mismatch,inconsistent,unused)
|
||||
lcov --capture --directory . --external "${COV_IGNORE[@]}" \
|
||||
--rc branch_coverage=1 \
|
||||
|
||||
Reference in new issue
Block a user