Skip to main content

Legacy superbuild assessment

How to assess a legacy superbuild workspace before migration to the modern CMake + Conan workflow. Output of this phase feeds the migration plan and per-project status documents.

Assessment goals

Produce an evidence-based inventory that answers:

  • What builds today on Linux via CMake?
  • What still depends on manual .vcxproj / .sln on Windows?
  • What dependencies are manual paths vs packaged?
  • What platform assumptions are embedded in code, CMake, or IDE projects?
  • What is the macOS build path today (CMake, Xcode, none)?
  • What is the migration order risk (critical path, coupling, generated code)?

Do not start rewriting builds until Phase 0 artifacts exist.

Scope of inventory

Workspace-level

ItemRecord
Superbuild root CMakeLists.txtLocation, subprojects registered, ordering
Top-level scriptsbuild.sh, batch files, CI YAML
Submodule listsrc/*, libs/*, other
Existing Conan usageNone / partial / workspace recipe
Existing CMakePresets.jsonPresent / absent / stale
tools/ai-rules/ submodulePresent / absent / pinned revision
Root AGENTS.mdPresent / absent

Per participating repository / project

Create one row per migratable unit (library, executable, plugin, tool). Use templates/project-migration-template.md.

FieldWhat to capture
Name / pathe.g. src/foo, libs/bar
Linux CMakeYes / partial / none
Windows .vcxproj / .slnPrimary / secondary / none
CMake qualityGlobal flags / target-based / mixed
DependenciesSystem, vendored libs/, manual LIBRARY_PATH, Conan candidate
Generated sourcesCodegen tools, timestamps, custom commands
Platform-specific sources#ifdef _WIN32, .rc, .def, macOS bundles
TestsCTest / custom / none
CI coverageLinux / Windows / macOS / combinations
OwnersTeam contact

Per .vcxproj (when Windows IDE is authoritative)

Extract or document equivalents for CMake mapping (see visual-studio-to-cmake-mapping.md):

  • ClCompile / ClInclude / None items
  • AdditionalIncludeDirectories
  • PreprocessorDefinitions
  • AdditionalOptions (compiler and linker)
  • AdditionalDependencies / AdditionalLibraryDirectories
  • SubSystem, EntryPointSymbol, .def files
  • CustomBuild / PreBuildEvent / PostBuildEvent
  • OutDir, TargetName, TargetExt
  • Per-configuration differences (Debug / Release / custom)
  • Platform toolset and Windows SDK version

Per legacy CMakeLists.txt (Linux baseline)

SignalRisk if ignored
include_directories() globalLeaks transitive includes; hard to map per-target
add_definitions() globalConfiguration drift vs Windows
link_directories()Non-portable search paths
file(GLOB ...)Misses new files; non-deterministic
Hardcoded /usr or C:\ pathsBreaks cross-platform
Missing target_* usageVS migration cannot attach cleanly

Dependencies and third-party

CategoryExamplesMigration note
Conan-readyboost, openssl, zlibPhase 4 candidate
Vendored in libs/patched forkKeep in tree; CMake target
System packages (Linux)apt libsReplace with Conan or document exception
Manual Windows redistributables.lib in repo treeMap to target_link_libraries; then Conan
Header-only vendoredinclude/ treeINTERFACE target

Platform assumptions in source

Search and catalog:

  • Backslash paths in strings or includes
  • WIN32 vs _WIN32 inconsistency
  • Assumed DLL vs static linking per platform
  • Path length / Unicode assumptions
  • Shell-only commands in custom steps

Assessment procedure

Step 1: Clone and build as-is

git clone --recursive <superbuild-url>
cd <workspace>
# Record exact commands that work today on Linux
cmake -S . -B build-legacy-linux -DCMAKE_BUILD_TYPE=Debug
cmake --build build-legacy-linux

On Windows (if available), record the current developer path:

  • Open .sln / .vcxproj and build Debug|x64
  • Note which projects are excluded from Linux CMake

Step 2: Generate inventories

  1. Repository manifest — table of all src/ and libs/ entries with build authority column
  2. VS project manifest — list every .vcxproj, its configurations, and mapped CMake counterpart (or NONE)
  3. Dependency graph — directed edges between projects and external libs
  4. Gap list — behaviors in VS not expressible in current Linux CMake

Step 3: Classify migration difficulty

TierCriteriaStrategy
ALinux CMake target-based; no VS-only projectsNormalize + presets + Conan deps
BLinux CMake with globals; parallel .vcxprojRefactor CMake, then VS parity pass
CVS-primary; weak or missing Linux CMakeVS intent extraction → new CMake
DHeavy codegen, custom commands, post-buildDedicated sub-phase; parity tests early

Step 4: Propose migration order

Order by:

  1. Leaf libraries (few dependents)
  2. Shared infrastructure used by many targets
  3. Applications and integration targets last

Avoid migrating the highest coupling node first unless it unlocks others.

Step 5: Record baseline artifacts

Store under consumer-controlled docs (not in tools/ai-rules/):

<consumer>/docs/migration/
├── inventory.md
├── dependency-graph.md
├── projects/
│ └── <name>.md # from project-migration-template
└── baselines/
├── linux-build-log.txt
└── windows-build-notes.md

Shared policy for how to assess lives here in superbuild-workflow. Per-workspace inventory data lives in the consuming repo.

Assessment exit criteria (Phase 0 complete)

  • Every participating project has a migration tier (A–D)
  • Every .vcxproj primary project has an owner and mapping worksheet started
  • Linux and Windows build entry points documented with exact commands
  • Dependency graph reviewed for Conan candidacy
  • Migration order agreed with engineering leads
  • No project started Phase 2+ without an inventory row