Repository navigation
build: make Cyberfluids consumable — install/export + zero-setup deps - #7
Merged
Merged
Conversation
Tier-1 adoption blockers: downstream projects could not consume Cyberfluids (no install rules, no find_package config), and building required a manual NumPP sibling checkout. Both are fixed. Installable package (find_package(Cyberfluids)): - install the public headers, the C ABI shared library (now with a semver-tracked VERSION/SOVERSION SONAME), and a generated CyberfluidsConfig.cmake + version file. - export namespaced targets Cyberfluids::core / Cyberfluids::c (via EXPORT_NAME) and re-resolve NumPP transitively with find_dependency. - verified end to end: a separate CMake project does find_package(Cyberfluids), links the targets, builds, and runs against the installed package. - gated behind CYBERFLUIDS_INSTALL and only enabled when NumPP is an installed package (the exported config must be able to re-resolve it). Zero-setup dependency resolution: - prefer find_package(NumPP CONFIG) from the bootstrap prefix; when NumPP is not installed, fall back to FetchContent at a pinned tag (v1.6.0) so a plain `cmake -B build` works with no manual checkout. Disable with -DCYBERFLUIDS_FETCH_DEPS=OFF for offline/vendored builds. - install/export is disabled in the fetch-only path (fetched NumPP is not an installed package), with a clear message. Docs + spec kept in sync: build-and-packaging spec gains the fetch-fallback and install/export requirements; getting-started.md gets a "Use Cyberfluids in your project" section and drops stale "GPU stubs" / "12 tests" text; README gains a find_package snippet; project.md dependency line corrected. All native tests pass (the 3 python failures are the known local Anaconda libstdc++ issue). openspec validate --all --strict passes (14/14).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the two biggest Tier-1 adoption blockers: outside projects couldn't consume Cyberfluids, and building required a manual NumPP sibling checkout.
1. Installable
find_package(Cyberfluids)packageCyberfluidsConfig.cmake+ version file.Cyberfluids::core/Cyberfluids::c(clean names viaEXPORT_NAME), and re-resolves NumPP transitively withfind_dependency.SOVERSION(libcyberfluids_c.so.0.0.1→.so.0), so consumers can pin ABI compatibility.-DCYBERFLUIDS_INSTALL(default ON), enabled only when NumPP is an installed package.Verified end-to-end — a separate CMake project:
…configures, builds, and runs against the installed package (
consumer sees D3Q19::q = 19, exit 0).2. Zero-setup dependency resolution
find_package(NumPP CONFIG)from the bootstrap prefix; when NumPP isn't installed, fall back to FetchContent at a pinned tag (v1.6.0) so a plaincmake -B buildworks with no manual checkout.-DCYBERFLUIDS_FETCH_DEPS=OFFfor offline/vendored builds.Verified — forcing
find_package(NumPP)to miss fetchesv1.6.0and builds the C ABI; install/export correctly skips itself.Docs + spec (kept in sync)
build-and-packagingspec: adds the fetch-fallback and install/export requirements (+ scenarios).docs/getting-started.md: new "Use Cyberfluids in your project" section; drops stale "GPU stubs" / "12 tests" text.README.md:find_packagesnippet.openspec/project.md: dependency line corrected.Testing
python_*failures are the known local Anacondalibstdc++mismatch (CI's system Python is unaffected).openspec validate --all --strict→ 14/14.Scope note
Tier-1's third item — a self-contained Python wheel (build the C ABI inside the wheel via scikit-build-core) — is intentionally deferred to a focused follow-up PR that can validate a clean-venv
pip install. This PR lays the install groundwork it will build on.