From ce154f6a1d4ac30570e237b6b436fd24a22aa134 Mon Sep 17 00:00:00 2001 From: Torsten Wierschin Date: Wed, 7 Oct 2026 09:02:30 +0000 Subject: [PATCH] Configure release build for first Qt6 release (TetraIF, Z, Lts/Common) - Add RELEASE_BUILD CMake option to control release scope - Modify main CMakeLists.txt to conditionally build only release modules - Modify Lts/CMakeLists.txt to only include Lts/Common when RELEASE_BUILD=ON - Modify Lts/Common/CMakeLists.txt to exclude LtsElevation (depends on Lts/Viewer/SituationMap) - Update new_docker_build.sh defaults for release: - RELEASE_BUILD=ON (default) - BUILD_RTI=OFF (avoids Lts/Services/GROUP1 dependency) - BUILD_GROUP3=ON (TetraIF), BUILD_GROUP5=ON (Z), BUILD_GROUP11=ON (Lts/Common) - All other BUILD_GROUP* variables OFF - Add RELEASE_BUILD to Docker environment exports and CMake invocation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- qt6-after/qt6-migrated-legatus/CMakeLists.txt | 21 +++++++++-- .../qt6-migrated-legatus/Lts/CMakeLists.txt | 26 +++++++++---- .../Lts/Common/CMakeLists.txt | 5 ++- .../qt6-migrated-legatus/new_docker_build.sh | 37 +++++++++++++------ 4 files changed, 64 insertions(+), 25 deletions(-) diff --git a/qt6-after/qt6-migrated-legatus/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/CMakeLists.txt index 002ecd75e..59cad7ce2 100755 --- a/qt6-after/qt6-migrated-legatus/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/CMakeLists.txt @@ -966,11 +966,24 @@ if(NOT DEFINED MIGRATE_MODULE) set(MIGRATE_MODULE "" CACHE STRING "If set, only add subdirectories covering this module (path relative to repo root)") endif() +# RELEASE_BUILD: when ON, only build the first release modules (TetraIF, Z, Lts/Common) +# This excludes Lts/Services, Lts/DDS, Lts/Tools, Lts/Application, Lts/Proxies, Lts/Plugins, Lts/Viewer, Lts/Projects +if(NOT DEFINED RELEASE_BUILD) + set(RELEASE_BUILD OFF CACHE BOOL "Build only the first release modules (TetraIF, Z, Lts/Common)") +endif() + # Add only guarded subdirectories -NGL_ADD_SUBDIR_GUARDED(TetraIF) -NGL_ADD_SUBDIR_GUARDED(Z/src) -# Services are included before plugins via Lts/CMakeLists.txt (LTS_SUBDIRS order) -NGL_ADD_SUBDIR_GUARDED(Lts) +if(RELEASE_BUILD) + message(STATUS "RELEASE_BUILD=ON: Building only TetraIF, Z/src, and Lts/Common") + NGL_ADD_SUBDIR_GUARDED(TetraIF) + NGL_ADD_SUBDIR_GUARDED(Z/src) + NGL_ADD_SUBDIR_GUARDED(Lts) +else() + NGL_ADD_SUBDIR_GUARDED(TetraIF) + NGL_ADD_SUBDIR_GUARDED(Z/src) + # Services are included before plugins via Lts/CMakeLists.txt (LTS_SUBDIRS order) + NGL_ADD_SUBDIR_GUARDED(Lts) +endif() # Add migration tests - skip when MIGRATE_MODULE targets specific Lts modules (tests need full codebase) # MUST be after Lts configuration so tests can access Lts targets (LtsTimelineClassic, codegen_base, etc.) diff --git a/qt6-after/qt6-migrated-legatus/Lts/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/CMakeLists.txt index d8f1c6d88..47370394f 100644 --- a/qt6-after/qt6-migrated-legatus/Lts/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/CMakeLists.txt @@ -16,16 +16,26 @@ else() endif() # Add only existing subdirectories to allow partial checkouts / incremental migration -set(LTS_SUBDIRS Tools Application DDS Common Services Proxies Plugins Viewer Projects) -foreach(dir IN LISTS LTS_SUBDIRS) - if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}") - # Use guarded add so top-level MIGRATE_MODULE can restrict which Lts subdirs are included - NGL_ADD_SUBDIR_GUARDED(${dir}) +if(RELEASE_BUILD) + # For first release: only build Lts/Common (excludes Tools, Application, DDS, Services, Proxies, Plugins, Viewer, Projects) + message(STATUS "RELEASE_BUILD=ON: Building only Lts/Common") + if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Common") + NGL_ADD_SUBDIR_GUARDED(Common) + else() + message(STATUS "Skipping missing Lts subdirectory: Common") + endif() else() - message(STATUS "Skipping missing Lts subdirectory: ${dir}") -endif() + set(LTS_SUBDIRS Tools Application DDS Common Services Proxies Plugins Viewer Projects) + foreach(dir IN LISTS LTS_SUBDIRS) + if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}") + # Use guarded add so top-level MIGRATE_MODULE can restrict which Lts subdirs are included + NGL_ADD_SUBDIR_GUARDED(${dir}) + else() + message(STATUS "Skipping missing Lts subdirectory: ${dir}") + endif() -endforeach() + endforeach() +endif() IF (BUILD_TESTING) if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Tests") diff --git a/qt6-after/qt6-migrated-legatus/Lts/Common/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Common/CMakeLists.txt index 51874006c..6b0ffa8bb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Common/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Common/CMakeLists.txt @@ -11,7 +11,10 @@ ADD_SUBDIRECTORY(LtsAppManager) ADD_SUBDIRECTORY(LtsCommandLineParser) ADD_SUBDIRECTORY(LtsCoordinate) ADD_SUBDIRECTORY(LtsCoordTrans) -ADD_SUBDIRECTORY(LtsElevation) +# LtsElevation depends on Lts/Viewer/SituationMap (outside release scope) - exclude from first release +if(NOT RELEASE_BUILD) + ADD_SUBDIRECTORY(LtsElevation) +endif() ADD_SUBDIRECTORY(LtsLicence) ADD_SUBDIRECTORY(LtsLogin) ADD_SUBDIRECTORY(LtsMultiMonitor) diff --git a/qt6-after/qt6-migrated-legatus/new_docker_build.sh b/qt6-after/qt6-migrated-legatus/new_docker_build.sh index 173b70e54..04df933f8 100755 --- a/qt6-after/qt6-migrated-legatus/new_docker_build.sh +++ b/qt6-after/qt6-migrated-legatus/new_docker_build.sh @@ -24,6 +24,11 @@ usage() { cat <<'EOF' Usage: ./new_docker_build.sh [ON|OFF] [options] +RELEASE_BUILD: + Environment variable RELEASE_BUILD=ON|OFF (default: ON) + When ON: builds only release modules (TetraIF, Z, Lts/Common) + Excludes LtsElevation (depends on Lts/Viewer/SituationMap) + BUILD_RTI: First positional argument may be: ON Enable BUILD_RTI @@ -72,6 +77,7 @@ Prebuilt Docker image management: --delete-prebuilt-image Delete the configured Docker image and exit Environment variable overrides: + RELEASE_BUILD=ON|OFF Enable release build (only TetraIF, Z, Lts/Common) BUILD_RTI=ON|OFF BUILD_GRANTLEE=ON|OFF BUILD_ARCGIS=ON|OFF @@ -102,21 +108,22 @@ Expected file: ${MIGRATE_PIPELINE_ROOT}/rti_license.dat Defaults: - BUILD_RTI=ON + RELEASE_BUILD=ON First release: only TetraIF, Z, Lts/Common + BUILD_RTI=OFF Release: OFF to avoid Lts/Services/GROUP1 dependency BUILD_GRANTLEE=ON BUILD_ARCGIS=OFF BUILD_CODIFICATION=OFF - BUILD_GROUP1=ON - BUILD_GROUP2=ON - BUILD_GROUP3=ON + BUILD_GROUP1=OFF Release: OFF (ddscore in Lts/Services) + BUILD_GROUP2=OFF Release: OFF (migration_tests) + BUILD_GROUP3=ON Release: ON (TetraIF) BUILD_GROUP4=OFF - BUILD_GROUP5=OFF + BUILD_GROUP5=ON Release: ON (Z) BUILD_GROUP6=OFF BUILD_GROUP7=OFF BUILD_GROUP8=OFF BUILD_GROUP9=OFF BUILD_GROUP10=OFF - BUILD_GROUP11=OFF + BUILD_GROUP11=ON Release: ON (Lts/Common) RUN_CTEST=ON TESTS_ONLY=OFF INTEGRATION_TEST=OFF @@ -664,21 +671,25 @@ BUILD_ALL="${BUILD_ALL:-ON}" BUILD_SV="${BUILD_SV:-ON}" BUILD_WS="${BUILD_WS:-ON}" BUILD_AAR="${BUILD_AAR:-ON}" -BUILD_RTI="${BUILD_RTI:-ON}" +# RELEASE_BUILD: for first Qt6 release - only build TetraIF, Z, Lts/Common (excludes LtsElevation) +RELEASE_BUILD="${RELEASE_BUILD:-ON}" +# For release: BUILD_RTI=OFF to avoid requiring Lts/Services/GROUP1 (ddscore) +BUILD_RTI="${BUILD_RTI:-OFF}" BUILD_GRANTLEE="${BUILD_GRANTLEE:-ON}" BUILD_ARCGIS="${BUILD_ARCGIS:-OFF}" BUILD_CODIFICATION="${BUILD_CODIFICATION:-OFF}" -BUILD_GROUP1="${BUILD_GROUP1:-ON}" -BUILD_GROUP2="${BUILD_GROUP2:-ON}" +# For release: only GROUP3 (TetraIF), GROUP5 (Z), GROUP11 (Lts/Common) +BUILD_GROUP1="${BUILD_GROUP1:-OFF}" +BUILD_GROUP2="${BUILD_GROUP2:-OFF}" BUILD_GROUP3="${BUILD_GROUP3:-ON}" BUILD_GROUP4="${BUILD_GROUP4:-OFF}" -BUILD_GROUP5="${BUILD_GROUP5:-OFF}" +BUILD_GROUP5="${BUILD_GROUP5:-ON}" BUILD_GROUP6="${BUILD_GROUP6:-OFF}" BUILD_GROUP7="${BUILD_GROUP7:-OFF}" BUILD_GROUP8="${BUILD_GROUP8:-OFF}" BUILD_GROUP9="${BUILD_GROUP9:-OFF}" BUILD_GROUP10="${BUILD_GROUP10:-OFF}" -BUILD_GROUP11="${BUILD_GROUP11:-OFF}" +BUILD_GROUP11="${BUILD_GROUP11:-ON}" BUILD_VIEWER_ONLY="${BUILD_VIEWER_ONLY:-OFF}" RUN_CTEST="${RUN_CTEST:-ON}" TESTS_ONLY="${TESTS_ONLY:-OFF}" @@ -891,7 +902,7 @@ fi CMAKE_BUILD_FLAGS="${CMAKE_BUILD_FLAGS:-}" # Export variables for Docker container -export BUILD_ALL BUILD_RTI BUILD_GRANTLEE BUILD_ARCGIS BUILD_CODIFICATION BUILD_GROUP1 BUILD_GROUP2 BUILD_GROUP3 BUILD_GROUP4 BUILD_GROUP5 BUILD_GROUP6 BUILD_GROUP7 BUILD_GROUP8 BUILD_GROUP9 BUILD_GROUP10 BUILD_GROUP11 BUILD_VIEWER_ONLY RUN_CTEST TESTS_ONLY INTEGRATION_TEST USE_PREBUILT_IMAGE BUILD_PREBUILT_IMAGE DELETE_PREBUILT_IMAGE DOCKER_IMAGE CMAKE_BUILD_FLAGS +export BUILD_ALL BUILD_RTI BUILD_GRANTLEE BUILD_ARCGIS BUILD_CODIFICATION BUILD_GROUP1 BUILD_GROUP2 BUILD_GROUP3 BUILD_GROUP4 BUILD_GROUP5 BUILD_GROUP6 BUILD_GROUP7 BUILD_GROUP8 BUILD_GROUP9 BUILD_GROUP10 BUILD_GROUP11 BUILD_VIEWER_ONLY RUN_CTEST TESTS_ONLY INTEGRATION_TEST USE_PREBUILT_IMAGE BUILD_PREBUILT_IMAGE DELETE_PREBUILT_IMAGE DOCKER_IMAGE CMAKE_BUILD_FLAGS RELEASE_BUILD # Group 5: Viewer module targets (conditional on BUILD_ARCGIS) # Note: LtsFileDialog excluded from viewer-only builds due to Group 4 dependencies (svcExmCommon, svcOpmCommon, svcFlmCommon) @@ -1300,6 +1311,7 @@ cmake .. \ -DBUILD_GRANTLEE="${BUILD_GRANTLEE}" \ -DBUILD_ARCGIS="${BUILD_ARCGIS}" \ -DBUILD_CODIFICATION="${BUILD_CODIFICATION}" \ + -DRELEASE_BUILD="${RELEASE_BUILD}" \ ${CMAKE_BUILD_FLAGS:-} \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_BUILD_TYPE=Release \ @@ -1380,6 +1392,7 @@ docker run --rm \ -e BUILD_GROUP10 \ -e BUILD_GROUP11 \ -e BUILD_VIEWER_ONLY \ + -e RELEASE_BUILD \ -e RUN_CTEST \ -e TESTS_ONLY \ -e INTEGRATION_TEST \