Product Purpose & Overview
Managing non-trivial C and C++ repositories routinely slows teams down with opaque CMakeLists.txt scripts, transitive dependency errors, compiler flag drift, and fragile package manager handoffs. CMakeVis is engineered for Windows 10/11 and Linux to help developers visually comprehend their build architecture and configure targets, toolchains, and external packages rapidly—accelerating iteration without hand-scripting build-system boilerplate.
Visual Architecture Comprehension
Inspect project executables, static/shared/interface libraries, transitive linkage scopes, and imported packages on an interactive node-and-wire graph.
Script-Free Configuration & Presets
Wire dependencies with cycle detection, manage token-level compiler flags, model CMakePresets.json inheritance, and chain vcpkg + Conan visually.
Safe Round-Trip on Existing Repos
Load hand-authored multi-directory CMake projects, preview predicted install trees prior to compiling, and apply scoped updates without overwriting custom scripts.
Documentation Contents
1. Projects, Subprojects & Baseline Snapshots
- Clean Startup Canvas: CMakeVis launches to a clean blank workspace (
UntitledProject, CMake 3.24, C++20 default) with in-memory system default presets, allowing immediate greenfield authoring or opening an existing repository without pre-populated template artifacts. - New Project: Select Project → New Project and choose a root directory; CMakeVis binds the workspace root without writing unsolicited starter files until you scaffold or export.
- Open Folder: Select Project → Open Folder (or pass
--open <path>) to asynchronously parse root and nestedadd_subdirectory(...)CMakeLists.txtfiles,.cmakemodules,CMakePresets.json/CMakeUserPresets.json(including"include"chains),vcpkg.json/vcpkg-configuration.json+ local port overlays,conanfile.txt/conanfile.py, and any existingCMakeCache.txtor CMake File-API reply. - Subprojects & Path Localization: Click + Subproject in the Project ribbon or under Explorer to register a relative subdirectory (such as
libs/core_mathorapps/studio_gui). File pickers and unassigned local source scanners automatically filter and display paths relative to that subproject while rebasing paths accurately during export. - Baseline Snapshots: When loading an existing repository from disk, CMakeVis records a per-target baseline snapshot (
CaptureBaseline) so you can later inspect diffs or revert individual targets cleanly. - Local Workstation Preferences: Recent workspace history and custom executable overrides (
cmake,ninja,vcpkg, and VS Code CLI paths) persist locally in%LocalAppData%\CMakeVis\settings.jsonon Windows and~/.local/share/CMakeVis/settings.jsonon Linux.
2. Workspace Shell, Ribbons, Explorer & Target Inspector
The main desktop window organizes project navigation, visual graph editing, toolchain configuration, and build output into four synchronized regions with collapsible splitters.
- Top Header & Three-Tab Ribbon: Displays the active project title (
CMakeVis — <ProjectName>), live status pill (Preset | Build | Install), Stop pipeline cancellation button (when running), Maximize Graph / Restore Panels toggle, and Collapse / Ribbon toggle across three tabs:- Project:
New Project,Open Folder,Open in VS Code,+ Subproject, Export Mode selector (Export: Per-Subproject CMakevs.Export: Single Combined CMake), andExport CMake. - Build & Toolchain:
Configure,Build,Install,Run All, activeConfigure Presetselector,Presets & Inheritance..., andSave Presets. - Panels & View: Visibility toggles for Left Explorer, Right Info, Bottom Drawer, Canvas Ribbon, and
Fit Graph to Screen.
- Project:
- Global Error Banner: Surfaces immediately beneath the top ribbon whenever global build or CMake configuration errors occur, providing one-click
Inspect ConsoleandClearactions. - Left Explorer: Provides quick + Subproject, + Executable, and + Library actions above eight persistent collapsible drawers: SubProject (with per-folder
VS Codelaunch buttons), Executables, Shared Libraries, Static Libraries, Interface Libraries, Object Libraries (withManage), Custom Targets, and Imported / External. Target entries show diagnostic counts, quick-edit buttons, and indented[TGT],[IMP], and[OBJ]dependency rows. - Center Six-Tab Workspace: Switches between Graph, Variables & Options, Install Preview, Packages & External, Environment & Toolchain, and CMake Source.
- Right Target Information Inspector: Selecting a dependency edge exposes its link type, generator condition, visibility picker (
Private,Public,Interface), andRemove Linkaction. Selecting a target exposes metadata shortcuts (CMake Source,VS Code,Folder in Code),Edit Properties & Files...,Reset Props, and eight collapsible inspector drawers (including Effective & Inherited Config and an unassigned local file scanner). - Bottom Drawer: Resizable panel hosting Diagnostics and the live Build Console.
3. Dependency Graph Interactions, Visual Semantics, Filtering & Object Libraries
The interactive Graph canvas transforms multi-target CMake scripts into a spatial dependency map with live cycle prevention, directional highlighting, and customizable layouts.
cli_probe illuminates its downstream dependency chain (dsp_engine, core_math, fmt::fmt, spdlog::spdlog) and displays inline build diagnostics while attenuating unrelated targets.Navigation & Wiring Controls (Tools / Filter / Layout Tabs)
- Pointer (Select / Move): Click a node to focus and inspect; double-click a node to open its Properties modal; drag a node body to reposition; or drag directly from a node's right output port circle onto another node's left input port to establish a
target_link_librariesedge. - Hand Pan & Always-On Gestures: Switch to Hand Pan for left-drag panning, or stay in Pointer mode and use middle-mouse drag anywhere, mouse wheel zoom (0.08×–3.0× centered on cursor), two-finger pinch/pan, or the floating bottom-right navigation HUD (
-, zoom %,+,Fit, center-selected). - Connect Targets & Cycle Validation: Dragging between targets previews a green valid wire or a red invalid wire with an inline message whenever a link would create a self-reference, link from an imported target, link to an executable, duplicate an existing edge, or introduce a circular dependency (verified via breadth-first reachability).
+ Package / ExtModal: Clicking + Package / Ext on the graph toolbar opens the four-tab Add Package / External Library modal (vcpkg,Conan,ExternalProject,FetchContent) featuringQuick Pick Popular Package...catalog auto-fill for package names,find_package/ Conan references, and imported::targets.- Subgraph Filtering & Layouts: Use
Search / dim...to highlight matching names, pick a subproject filter, choose a preset view filter (All Nodes,Selected + Direct,Selected + Tree,Exes + Connected,Project Only), or open Filter Targets... (GraphFilterModal) to isolate seed targets with transitive, upstream, and imported traversal toggles. Enable Tree Glow for directional highlighting without cross-highlighting unrelated consumers of shared leaf packages. Switch layouts between Layered Flow and Subproject Clusters. - Background
OBJECTLibraries & File-API Hygiene:OBJECTlibraries stay off the main graph canvas in a dedicated background collection (Object Libs / Explorer → Object Libraries → Manage) to prevent edge clutter, while File-API enrichment automatically filters internal CMake/Qt targets such asZERO_CHECK,ALL_BUILD,*_autogen, and_deps/artifacts.
| Graph Element | Visual Style & Semantics |
|---|---|
| Executable | Blue-accented solid card labeled EXE. |
| Project Libraries | Emerald-accented solid cards labeled STATIC, SHARED, MODULE, or IFACE; displays an embedded object-library count badge (· [obj N]) when OBJECT libraries are assigned. |
| Custom Target | Amber-accented solid card labeled CUSTOM. |
| Imported / Package Targets | Dashed-border cards styled by origin: VCPKG IMP (violet), CONAN IMP (magenta), EXT IMP (orange), FETCH IMP (amber), or IMPORTED (slate). |
| Dependency Wires | Directed cubic Beziers with midpoint scope pills: PRIV (emerald), PUB (cyan), IFACE (violet), and dotted DEP (add_dependencies); appends * when guarded by a generator expression. |
4. Target Properties Modal & Per-Target Configuration
Double-clicking any graph node (or selecting Edit Properties & Files... in the Inspector) opens the five-tab Target Properties & Files modal operating on a working copy until you select Apply & Save:
- General & Properties: Edit target name, target kind, project/subproject assignment, C++ standard (
C++11–C++23or Inherit Project Default), C standard (C90–C23), seven standard string properties (OUTPUT_NAME,PREFIX,SUFFIX,DEBUG_POSTFIX,VERSION,SOVERSION,FOLDER), eight boolean property toggles (POSITION_INDEPENDENT_CODE,WINDOWS_EXPORT_ALL_SYMBOLS,WIN32_EXECUTABLE,AUTOMOC,AUTOUIC,AUTORCC,INTERPROCEDURAL_OPTIMIZATION,EXCLUDE_FROM_ALL), and arbitrary custom key/value properties. - Files & PCH: Add existing files, create stub files, invoke + Scan Folder... to discover source/header/UI/QRC files, click + Assign All Found for unassigned subproject files, set file category (
Source,Header,PublicHeader,Resource) and visibility, remove missing files, and managetarget_precompile_headers. - Dependencies & Objects: Link/unlink target dependencies, toggle
Private/Public/Interfacescope, composeOBJECTlibrary dependencies ($<TARGET_OBJECTS:...>), and edittarget_link_directories. - Compiler & Linker Flags: Inspect inherited directory and toolchain flags (click chips to record target-level suppression in the inspector), construct generator-guarded flags using the Per-Config & Language Flag Builder (emitting
$<$<CONFIG:...>:...>and$<$<COMPILE_LANGUAGE:...>:...>), and edit scopedInclude Directories,Compile Definitions,Compile Options, andLink Options. - Install & Custom Steps: Toggle target artifact installation, public header installation, and
OPTIONALinstall rules; setRUNTIME,LIBRARY,ARCHIVE, andPUBLIC_HEADERdestinations,COMPONENT, andEXPORTset name; and configurePreBuild,PreLink, andPostBuildcustom commands.
Use Reset Properties to Defaults to restore CMake defaults while keeping assigned source files and dependency links, or Revert to Loaded CMake (enabled for disk-loaded projects) to restore the target's exact baseline snapshot.
5. Build Options, Cache Variables & Token-Level Compiler/Linker Flags
Open Variables & Options in the center workspace to manage global build switches, cache entries, toolchain flag tokens, and preset quick-switches across three sub-tabs:
- Options & Variables: Filter, add, reset, or override
option(...)toggles with-Doverrides; edit cache variables; and import live entries fromCMakeCache.txtvia Load CMakeCache.txt. - Compiler & Linker Flags: Inspect and edit 27 standard toolchain flag variables (
CMAKE_C_FLAGS,CMAKE_CXX_FLAGS, linker flags acrossEXE/SHARED/STATIC/MODULE,CMAKE_RC_FLAGS,CMAKE_SWIG_FLAGS,CMAKE_MSVC_RUNTIME_LIBRARY,CMAKE_POSITION_INDEPENDENT_CODE, andCMAKE_INTERPROCEDURAL_OPTIMIZATION) filtered by scope, configuration, and category. Click any default toolchain token chip to remove it cleanly viastring(REPLACE ...), check Wipe Defaults to emit an explicitset(...), append custom tokens, or click + Subdir Override Scope to customize flags and directory-level compile/link options inside anyadd_subdirectoryscope. - Presets & Global Settings: Apply configure presets, open the visual Preset Designer, adjust project-wide default C++ standard and
CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS, edit global includes/definitions/flags, and inspect detected subdirectories,.cmakemodules,find_libraryentries, andCTesttests.
6. Modern CMake Presets, Provenance & Toolchain Chaining
Under Environment & Toolchain → CMake Presets & Inheritance (or via Presets & Inheritance... in the top ribbon), CMakeVis authors and resolves native CMakePresets.json and CMakeUserPresets.json workflows (cmake -S <root> --preset <name>) across MSVC, Windows clang-cl, GCC, Clang, MinGW, Ninja, and Visual Studio generators.
- Inheritance Tree & Origin Provenance: Displays multi-level hierarchies (including
"include"directives and multi-parentinheritschains). Selecting any preset displays resolved settings alongside origin badges ([own],[from '<ancestor>'], or[unset]) and evaluates${sourceDir},${presetName},${generator},$env{...}, and$penv{...}macros. - Visual Authoring & Host Defaults: Create hidden base templates (+ Base Preset), derived presets (+ Child Preset), or clones (Duplicate); toggle parent chips with automatic cycle prevention; select discovered compilers; configure
binaryDir,installDir, forwarded environment variables (such asVCPKG_KEEP_ENV_VARS=Qt6_ROOT), and cache variables; or click System Defaults to generate baseline host presets automatically. - Simultaneous
vcpkg+ Conan Chaining: Selecting Both: vcpkg + Conan Chained setstoolchainFileto$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmakeand configures cache variableVCPKG_CHAINLOAD_TOOLCHAIN_FILEto${sourceDir}/build/${presetName}/conan_toolchain.cmake. During Configure, CMakeVis automatically runsconan installfirst so both package managers interoperate cleanly. - Host Compilers & Fallback Paths: Switch to the companion sub-tab to rescan host compilers, override target OS/architecture/configuration, or specify explicit
cmake,ninja, andVCPKG_ROOTpaths.
7. Package Managers, Local vcpkg Port Overlays & SDK Wizards
Open Packages & External in the center workspace to integrate host SDKs, curated package registries, local port overlays, and external source builds:
- SDKs &
find_package: Run Scan Host SDKs (Qt / Python3 / SWIG) and launch built-in wizards:- Qt5 / Qt6 Wizard: Enable
AUTOMOC,AUTOUIC, andAUTORCC, select across 16 Qt modules (includingCore,Gui,Widgets,Network,Concurrent,Sql,Svg,OpenGL,Qml, andQuick), and bind importedQt6::*targets directly to your project target. - Python3 Wizard: Configure
Python3::ModuleorPython3::SABIModulewith optional Stable ABI (Py_LIMITED_API) definition wiring. - SWIG Bindings Wizard: Author
swig_add_librarywrapper modules forpython,csharp,java,lua, orjavascript, automatically configuringUseSWIGand language runtime linkages.
- Qt5 / Qt6 Wizard: Enable
- vcpkg & Local Port Overlays: Manage
vcpkg.jsondependencies, version overrides, andvcpkg-configuration.jsonoverlay port directories. Create or edit local port overlays (portfile.cmake+ overlayvcpkg.json) in the overlay editor modal with one-click upstream template cloning from%VCPKG_ROOT%/ports. - Conan & External Targets: Manage
conanfile.txtrequirements (CMakeDepsandCMakeToolchain) alongside Git/URL-basedExternalProject_AddandFetchContentspecifications. Packages and external repositories can also be added directly from the graph toolbar via + Package / Ext using the built-inQuick Pick Popular Package...catalog.
8. Pre-Flight Install Preview & Dual-Mode CMake Source Editor
Verify deployment trees and inspect generated or hand-authored manifests before triggering a build using the Install Preview and CMake Source workspace tabs.
- Install Preview: Simulates exact output paths under
bin/,lib/,include/, andlib/cmake/across Windows and Linux (including executables, DLLs/SOs, import/static archives, debug PDBs, SONAME symlinks, public headers, and CMake export targets). Existing artifacts flip automatically fromPLANNEDtoON DISKwith file sizes, and excluded project targets can be enabled in one click. - Dual-Mode CMake Source Editor: Switch between Project Hierarchy (per-subproject tree and disk manifest files) and Single Combined view alongside live
vcpkg.json,vcpkg-configuration.json, andconanfile.txttabs. Use Sync From Graph, Parse Edited CMake → Update Graph, or Save File & Reload to stay synchronized. - Preserving Hand-Authored
CMakeLists.txtFiles: On loaded multi-directory repositories, Export Per-Subproject / Scoped Export applies targeted patches in-place and isolates visual additions inside delimited# BEGIN CMAKEVIS OVERRIDES…# END CMAKEVIS OVERRIDESblocks rather than overwriting existing custom CMake logic, while leaving unmodifiedvcpkg.jsonmanifests untouched on disk.
9. Build Execution Pipeline, Smart Auto-Scroll & Diagnostic Correlation
- Asynchronous Pipeline Execution: Clicking Configure, Build, Install, or Run All injects CMake File-API client queries, captures Windows
vcvarsall.batenvironments automatically for MSVC andclang-cl, streams live stdout/stderr to the non-blocking Pipeline Execution modal and bottom Build Console, and allows hiding the modal to the background without canceling the running build. - Smart Terminal Auto-Scroll: Clicking inside or scrolling upward in the build console automatically pauses Auto-scroll so compiler output remains stationary during inspection; select Scroll to Bottom (or press Ctrl+End) to jump to the latest output and resume live scrolling.
- Five-Stage Diagnostic Correlation: Parsed CMake, MSVC, GCC, Clang, and Ninja diagnostics are mapped back to owning graph nodes by source file ownership, build-directory target context, CMake target mentions, header matches, or token matching, lighting up diagnostic callouts directly on the dependency graph. Target-unassigned or global configuration errors also trigger the top Global Error Banner (
Inspect Console/Clear) so no failure goes unnoticed.
10. Visual Studio Code Integration & CLI Reference
CMakeVis discovers the local Visual Studio Code CLI (code / code.cmd) across five entry points: the top Project → Open in VS Code button, per-subproject VS Code buttons in Left Explorer, VS Code / Folder in Code / per-file Code buttons in Target Information, Open in VS Code in the CMake Source editor, and per-diagnostic VS Code actions in the Diagnostics drawer (jumping directly via code -g <file>:<line>).
CMakeVis also ships a companion Visual Studio Code extension and command-line flags (--open <path>, --preset <name>, --self-test, and --self-test --screenshot <png> for exporting a 1400×900 dependency graph snapshot). See the CMakeVis Companion VS Code Extension Documentation →