Repository navigation
[CMAKE] Standardize the build outputs - #113
Open
lukeyreyno wants to merge 3 commits into
Open
lukeyreyno wants to merge 3 commits into
lukeyreyno wants to merge 3 commits into
Conversation
skywolf829
reviewed
Nov 10, 2026
skywolf829
left a comment
Collaborator
There was a problem hiding this comment.
thanks @lukeyreyno, this is a nice cleanup! presets + scripts are much easier to follow, and CI is green across the board. a few things:
CMakePresets.json: build presets don't pin a configuration. the test presets runRelWithDebInfo, but the build presets don't setconfiguration. with a multi-config generator (VS is the default on windows when ninja isn't on PATH),cmake --build --preset devbuilds Debug, and thenctest --preset devcan't find the binaries. you can repro on mac withrm -rf build/dev && CMAKE_GENERATOR="Ninja Multi-Config" scripts/test.sh dev, which gives 4/4 "Not Run". CI forces ninja, so it never hits this. adding"configuration": "RelWithDebInfo"to the build presets (and"Debug"fordebug) should fix it.- wasm output moving out of
dist/. just flagging that this hits every wasm build, not only preset builds: plainemcmake cmake -B build-wasm .now writes tobuild-wasm/dist/. anything that copies from<repo>/dist/(e.g. however we're producing@adobe/spz) will need updating. it also overlaps withlreyna/spz-packages, which writes the 2gb/4gb variants to${CMAKE_CURRENT_SOURCE_DIR}/distanddist/4gb, so it's probably worth deciding which layout wins before both land. - nits:
.gitignore: the.claude/worktrees/and.claude/settings.local.jsonentries feel like personal tooling for a shared upstream repo. maybe drop them, or put them in.git/info/exclude?test.yml: the android job name still usesmatrix.abi, but the preset hard-codesarm64-v8a.- the
debugtest preset repeatsoutputfrombaseinstead of inheriting it.
This branch has not been deployed
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
Standardizes how the repo is built and tested. CMake presets give each configuration a named build folder under
build/<preset>/, helper scripts wrap those presets for users and CI, and.gitignorenow covers build output by explicit rules instead of by accident.Changes
CMakePresets.json(CMake 3.21+) withdev,dev-ext,debug,wasm,wasm-ext,android-arm64andandroid-arm64-ext; each builds intobuild/<preset>/, and the native presets have matching test presets.scripts/build.sh <preset>checks prerequisites and then configures and builds;scripts/test.sh <preset>builds and then runs CTest;scripts/test-python.sh [--ext]builds the bindings into.venv/and runs pytest.spz.js,spz.d.tsand the helper files now go tobuild/<preset>/dist/instead of the in-repodist/; the newSPZ_WASM_OUTPUT_DIRsetting overrides the location. Separate builds with and without extensions no longer overwrite each other.samples/hornedlizard.spz(SPZ to PLY to SPZ) and check the point count. They are enabled only whenBUILD_TESTINGis on and spz is the top-level project.3.14...3.31(FetchContent_MakeAvailableneeds 3.14).-O3is no longer applied to Debug WASM builds.-sUSE_ZLIBflag and thecopy_spz_dtstarget, which did nothing.emcmake.python_devtoolsbuild requirement, moved the scikit-build folder tobuild/py/, and cibuildwheel now installs thetestsextra and runstests/python..gitignorenow ignores/build/,/build-*/,/dist/,.venv/,node_modules/and.claude/worktrees/, and the repo-wide*.cmakerule is replaced with specific file names.Testing
scripts/test.sh dev,scripts/test.sh dev-extandscripts/test.sh debugpass 4/4 smoke tests.scripts/build.sh wasmandscripts/build.sh wasm-extproduce all four files inbuild/<preset>/dist/.emcmakefails with the guard message.scripts/test.sh wasmexits early with the list of presets that have tests.scripts/test-python.shandscripts/test-python.sh --ext(blocked in the dev sandbox), and the Android presets (needANDROID_NDK_HOME).git statusstays clean after builds;git check-ignore cmake/Foo.cmakereports the file as not ignored.