CORE (CommonDB) integration

August 30, 2026 · View on GitHub

LibMan can optionally link CORE. CommonDB is a private repository. At configure time LibMan probes GitHub API access to IHP-GmbH/CommonDB (curl + LIBMAN_CORE_GIT_TOKEN / GITHUB_TOKEN if set). If the repo is reachable — CORE is enabled; otherwise stub implementations are used (LIBMAN_NO_CORE).

Default behaviour

qmakecore_build_config.pri runs scripts/probe_core_access.sh (or .cmd on Windows):

mkdir -p build && cd build
qmake ../libman.pro
make -j1 capnp_install
make -j1 lstream_schemas
make -j"$(nproc)"

Without access you will see: LibMan: building without CORE (CommonDB not available).

CMake — same probe via cmake/ProbeCoreAccess.cmake:

cmake -B build
cmake --build build -j

Enable CORE access

MethodWhen
export LIBMAN_CORE_GIT_TOKEN=ghp_...PAT with repo read on IHP-GmbH/CommonDB
export GITHUB_TOKEN=...Same (fallback env var)
Clone to .deps/CommonDBLocal checkout (no probe needed)
LIBMAN_CORE_SOURCE_DIR=/path/to/CommonDBSide-by-side development tree

After a successful probe, qmake builds fetch CORE on make core_fetch (or automatically when the target exists in CI).

Force overrides

qmakeCMake
CONFIG+=no_core-DLIBMAN_FORCE_NO_CORE=ON
CONFIG+=core-DLIBMAN_FORCE_CORE=ON

Full CORE build (with access)

qmake

export LIBMAN_CORE_GIT_TOKEN=ghp_...
qmake ../libman.pro
make -j1 capnp_install
make -j1 lstream_schemas
make -j1 core_fetch
make -j"$(nproc)"

CMake

export LIBMAN_CORE_GIT_TOKEN=ghp_...
cmake -B build
cmake --build build -j

FetchContent clones CORE to .deps/CommonDB/ and links CORE::core / CORE::core_utils.

Re-configure after changing the CORE revision:

Remove-Item -Recurse -Force .deps/CommonDB
cmake -B build

Or pin a tag/commit:

cmake -B build -DCORE_GIT_TAG=91705d7

Local CORE checkout (development)

cmake -B build -DLIBMAN_CORE_SOURCE_DIR=C:/path/to/CommonDB

Installed CORE (advanced)

cmake -B build -DLIBMAN_FETCH_CORE=OFF -DCORE_DIR=...

(find_package(CORE) — requires CORE installed with cmake --install.)

CMake cache variables

VariableDefaultDescription
LIBMAN_FORCE_COREOFFEnable CORE even if GitHub probe fails
LIBMAN_FORCE_NO_COREOFFDisable CORE even if probe succeeds
LIBMAN_FETCH_COREONFetch CORE from GitHub (when CORE enabled)
CORE_GIT_URLhttps://github.com/IHP-GmbH/CommonDB.gitRepository URL
CORE_GIT_TAGmainBranch, tag, or commit
LIBMAN_CORE_SOURCE_DIR(empty)Local tree instead of fetch

Using CORE in LibMan code

#include "database.h"

core::Database db;
db.loadFromFile("layout.core");

Link targets are already set in CMakeLists.txt (CORE::core, CORE::core_utils).

CI (GitHub Actions)

JobCORE
build-linux-no-coreNo token — probe fails, stubs only
build-linux, tests-linux, build-windows, build-rhel8, build-ubuntu24GH_PAT (or legacy LIBMAN_CORE_GIT_TOKEN) — CommonDB checkout + full CORE

Add repository secret (org-level GH_PAT is preferred — same token as Qucs/XSchem/KLayout CI):

SecretDescription
GH_PATPAT with repo read access to IHP-GmbH/CommonDB
LIBMAN_CORE_GIT_TOKENLegacy alias (still accepted if GH_PAT is unset)

qmake / cmake auto-detect access; no manual CONFIG+=core required in CI.

Layout view in LibMan

layout (and legacy core) is a first-class layout view suffix (like gds, oas, lstr):

  • Create: View panel → New → Layout → layout (creates <cell>/<cell>.layout.core)
  • Tree: expand layout to browse cell hierarchy from LibIndex
  • Open: double-click opens the file in KLayout with a resolved top cell; see KLayout integration for server setup, root-cell rules, and mcore plugin notes.

Schematic/symbol (*.schematic.core, *.symbol.core): on Windows open in Xschem via WSL (Xschem integration) and/or Qucs-S (Qucs-S integration) — register one or both in Tool Manager.

Default LayoutViews property: gds,oas,lstr,layout.

Project file and views

View paths come from the project file (define(library, path)). Edit entries in Project Editor (File → Edit Project..., Ctrl+E). Bulk-import from external formats via Import (File → Import...). After Save or import, LibMan reloads libraries; removed views disappear from the tree and documentation for the selected library is refreshed.

Converter tools

With CORE_BUILD_EXAMPLES=ON (default in LibMan CMake / qmake fetch scripts), converter executables are deployed next to libman.exe for the Import dialog. See Import for formats, folder import, and LIBMAN_CONVERTER_DIR.