Files
torstenandCopilot 0f23fad65b
Qt6 Migration CI / migrate (push) Waiting to run
Migration infrastructure updates for Qt6/RTI 7.7
- Updated MIGRATION_STATUS.md with current build status and blockers
- Updated combined-migration-compact.prompt.md with latest instructions
- Updated Dockerfile for migration pipeline with RTI 7.7 support
- Updated build scripts for Docker-based migration workflow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 01M1BQ6VBZ20E1WJ29NYGT8EWJ
2026-08-31 12:52:57 +02:00

45 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
set -e
cd /tmp
rm -rf ./log4qt
git clone --depth 1 https://github.com/MEONMedical/Log4Qt.git ./log4qt
cd log4qt
# Patch source files BEFORE build for C++17 compatibility
# Fix 1: Replace C++20 spaceship operator in level.h
sed -i 's/\[\[nodiscard\]\] constexpr auto operator<=>(const Level\& other) const noexcept = default;/bool operator<(const Level\& other) const noexcept { return mValue < other.mValue; }\n bool operator<=(const Level\& other) const noexcept { return mValue <= other.mValue; }\n bool operator>(const Level\& other) const noexcept { return mValue > other.mValue; }\n bool operator>=(const Level\& other) const noexcept { return mValue >= other.mValue; }\n bool operator==(const Level\& other) const noexcept { return mValue == other.mValue; }/' src/log4qt/level.h
# Fix 2: Ensure mThreshold.load() is used in appenderskeleton.h
sed -i 's/return (mThreshold <= level)/return (mThreshold.load() <= level)/g' src/log4qt/appenderskeleton.h
mkdir build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DLOG4QT_BUILD_TESTS=OFF \
-DLOG4QT_EXAMPLES=OFF \
-DLOG4QT_BUILD_SHARED_LIBS=ON
make -j$(nproc)
make install
# Verify CMake config files were installed
if [ -f /usr/local/lib/cmake/Log4Qt/Log4QtConfig.cmake ]; then
echo "Log4Qt CMake config installed successfully"
else
echo "WARNING: Log4Qt CMake config not found, creating manually..."
mkdir -p /usr/local/lib/cmake/Log4Qt
cat > /usr/local/lib/cmake/Log4Qt/Log4QtConfig.cmake << 'EOF'
include(CMakeFindDependencyMacro)
find_dependency(Qt6 COMPONENTS Core)
include("${CMAKE_CURRENT_LIST_DIR}/Log4QtTargets.cmake")
set(Log4Qt_FOUND TRUE)
set(Log4Qt_INCLUDE_DIRS "/usr/local/include")
set(Log4Qt_LIBRARIES "log4qt")
EOF
fi
echo "log4qt built and installed with CMake config"