chore(CMake/migrate): relax Grantlee/RTI requirements and avoid permission issues in fallback docker run\n\n- Make Grantlee optional and skip codegen_grantlee when missing

- Keep RTI optional (no REQUIRED)
- Use host UID:GID when running fallback docker run to allow cleaning build dir
\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torsten committed 2026-07-17 12:55:35 +02:00
1 parent 3dbbcc1303
commit 699d745a6a
2 files changed
+58 -54

No files matched your search

+57 -53
View File
@@ -5,7 +5,7 @@
#
FIND_PACKAGE(RTI)
FIND_PACKAGE(Grantlee5 REQUIRED)
FIND_PACKAGE(Grantlee5)
NGL_ADD_LIBRARY(ALL codegen_base SHARED
codegen_export.h
@@ -43,71 +43,75 @@ else()
endif()
NGL_INSTALL_TARGET(codegen_base)
NGL_ADD_LIBRARY(ALL codegen_grantlee STATIC
CppTopicGeneratorGrantlee.cpp
CppTopicGeneratorGrantlee.h
DaoGeneratorGrantlee.cpp
DaoGeneratorGrantlee.h
DatabaseGeneratorGrantlee.cpp
DatabaseGeneratorGrantlee.h
GeneratorGrantleeBase.cpp
GeneratorGrantleeBase.h
GrantleeWrappers.cpp
GrantleeWrappers.h
if (TARGET Grantlee5::Templates)
NGL_ADD_LIBRARY(ALL codegen_grantlee STATIC
CppTopicGeneratorGrantlee.cpp
CppTopicGeneratorGrantlee.h
DaoGeneratorGrantlee.cpp
DaoGeneratorGrantlee.h
DatabaseGeneratorGrantlee.cpp
DatabaseGeneratorGrantlee.h
GeneratorGrantleeBase.cpp
GeneratorGrantleeBase.h
GrantleeWrappers.cpp
GrantleeWrappers.h
svc.idl.grantlee
svc_enums.idl.grantlee
svc.idl.grantlee
svc_enums.idl.grantlee
svc_translation.cpp.grantlee
svc_translation.h.grantlee
svc_translation.cpp.grantlee
svc_translation.h.grantlee
svc_dao.cpp.grantlee
svc_dao.h.grantlee
svc_dao.cpp.grantlee
svc_dao.h.grantlee
svc_db.h.grantlee
svc_db_impl.h.grantlee
svc_db_impl.cpp.grantlee
svc_db.h.grantlee
svc_db_impl.h.grantlee
svc_db_impl.cpp.grantlee
svc_dtc.h.grantlee
svc_dtc_impl.cpp.grantlee
svc_dtc_impl.h.grantlee
svc_dtc.h.grantlee
svc_dtc_impl.cpp.grantlee
svc_dtc_impl.h.grantlee
svc_dts.h.grantlee
svc_dts_impl.cpp.grantlee
svc_dts_impl.h.grantlee
svc_dts.h.grantlee
svc_dts_impl.cpp.grantlee
svc_dts_impl.h.grantlee
svc_ftc.h.grantlee
svc_ftc_impl.cpp.grantlee
svc_ftc_impl.h.grantlee
svc_ftc.h.grantlee
svc_ftc_impl.cpp.grantlee
svc_ftc_impl.h.grantlee
svc_fts.h.grantlee
svc_fts_impl.cpp.grantlee
svc_fts_impl.h.grantlee
svc_fts.h.grantlee
svc_fts_impl.cpp.grantlee
svc_fts_impl.h.grantlee
svc_json.cpp.grantlee
svc_json.h.grantlee
svc_json.cpp.grantlee
svc_json.h.grantlee
svc_topic_type_plugin.cpp.grantlee
svc_topic_type_plugin.h.grantlee
svc_topic_type_plugin.cpp.grantlee
svc_topic_type_plugin.h.grantlee
svc_record_replay_plugin.cpp.grantlee
svc_record_replay_plugin.h.grantlee
svc_record_replay_plugin.cpp.grantlee
svc_record_replay_plugin.h.grantlee
codegen_simple.py
)
codegen_simple.py
)
NGL_TARGET_LINK_LIBRARIES(codegen_grantlee
PRIVATE
Grantlee5::Templates
NGLLogger
ProjectConfig
PUBLIC
codegen_base
)
NGL_TARGET_INCLUDE_DIRECTORIES(codegen_grantlee
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(codegen_grantlee
PRIVATE
Grantlee5::Templates
NGLLogger
ProjectConfig
PUBLIC
codegen_base
)
NGL_TARGET_INCLUDE_DIRECTORIES(codegen_grantlee
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
)
else()
message(STATUS "Grantlee5 not found; skipping codegen_grantlee target")
endif()
NGL_ADD_EXECUTABLE(ALL codegen
main_grantlee.cpp
+1 -1
View File
@@ -38,7 +38,7 @@ else
echo "run_docker.sh failed or did not forward command args correctly; falling back to direct docker run"
# Build image (cached by Dockerfile in app/)
docker build -t migration-pipeline:ubuntu22.04 ./app >/dev/null || true
docker run --rm -v "$REPO_DIR":/repo -w /repo -e CMAKE_PREFIX_PATH=/opt/Qt/6.8.3/gcc_64 -e Qt6_ROOT=/opt/Qt/6.8.3/gcc_64 -e QT_QPA_PLATFORM=offscreen migration-pipeline:ubuntu22.04 bash -lc "set -euo pipefail && export LD_LIBRARY_PATH=/opt/Qt/6.8.3/gcc_64/lib:\${LD_LIBRARY_PATH:-} && rm -rf /repo/build && mkdir -p /repo/build && cd /repo/build && cmake -S /repo -B /repo/build -G Ninja -DCMAKE_PREFIX_PATH=/opt/Qt/6.8.3/gcc_64 -DCMAKE_CXX_STANDARD=20 -DMIGRATE_MODULE=${MODULE_PATH} -DBUILD_TESTING=ON && cmake --build /repo/build -- -j${JOBS} && ctest --test-dir /repo/build --output-on-failure"
docker run --rm --user "$(id -u):$(id -g)" -v "$REPO_DIR":/repo -w /repo -e CMAKE_PREFIX_PATH=/opt/Qt/6.8.3/gcc_64 -e Qt6_ROOT=/opt/Qt/6.8.3/gcc_64 -e QT_QPA_PLATFORM=offscreen migration-pipeline:ubuntu22.04 bash -lc "set -euo pipefail && export LD_LIBRARY_PATH=/opt/Qt/6.8.3/gcc_64/lib:\${LD_LIBRARY_PATH:-} && rm -rf /repo/build && mkdir -p /repo/build && cd /repo/build && cmake -S /repo -B /repo/build -G Ninja -DCMAKE_PREFIX_PATH=/opt/Qt/6.8.3/gcc_64 -DCMAKE_CXX_STANDARD=20 -DMIGRATE_MODULE=${MODULE_PATH} -DBUILD_TESTING=ON && cmake --build /repo/build -- -j${JOBS} && ctest --test-dir /repo/build --output-on-failure"
echo "Migration run for module ${MODULE_PATH} finished via direct docker run. Check ./build for logs and artifacts."
fi