Repository navigation
Share the CMake infrastructure through cmake/, and pin ost 0.23.6 - #27
Merged
Merged
Conversation
Phase 1 of the CMake cleanup. cmake/UsdMotionProject.cmake reads the repository-root VERSION for the root and every component, and applies the project policy (C++20, Release for a single-config generator) and each component's tests option after its project() call. The eleven hard-coded "0.5.1" fallbacks are gone: a standalone configure reaches VERSION the same way it reaches the module, so there was never a build that used them, only a number to drift. check_docs.py now fails a component that restates a version instead of checking that it mirrors one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 2 of the CMake cleanup. usdmotion_require_openusd() replaces the find_package(pxr) + include pair every member repeated: it resolves OpenUSD unless the root already has, enforces the 26.08 pin as before, and aliases each library the repository names as usdmotion::pxr::<name>, whichever of `gf` or `pxr::gf` the install exports. The eight `if(TARGET gf) ... elseif(TARGET pxr::gf)` blocks and foreach lookups are gone from libraries, tools, tests and the bundle; they link the alias. The OpenExec probe checks the alias too, so it no longer assumes bare names. Exported packages are unchanged -- CMake records the imported name an alias resolves to, and the installed tree is identical file for file. The two boundary checks that read link names learn the alias: motionCore's now reads its link line as names (it matched "usd" inside "usdmotion"), and execMotion's accepts the usdmotion::pxr:: spelling, with self-test cases for all three spellings and a refused library under each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 3 of the CMake cleanup. cmake/UsdMotionTargets.cmake adds:
* usdmotion_require_dependency(<package>) -- the in-tree target when the
root has built it, find_package() otherwise. It replaces nineteen
`if(NOT TARGET x::x) find_package(x)` blocks and keeps each dependency
on its own line, so the bundle's per-edge comments stay where they are.
* usdmotion_target_utf8(<target> <PUBLIC|PRIVATE>) -- the scope is still
the caller's, because it means something: a library whose installed
headers carry UTF-8 passes PUBLIC, as before, and the exported
packages are unchanged file for file.
UsdMotionUtf8CodePage.cmake is now reached through UsdMotionProject.cmake
like the rest, so a tool includes one module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 4 of the CMake cleanup. cmake/UsdMotionInstall.cmake adds
usdmotion_install_library(TARGET PACKAGE [COMPATIBILITY]) and
usdmotion_install_tool(), replacing the thirty-line install/export block
each library repeated and the two-line one each tool did. The package
identity is unchanged: <P>::<P>, config under <libdir>/cmake/<P>.
Two installed files change, and both on purpose:
* motionSource and motionBvh now write SameMinorVersion like the other
five. The others switched when they joined the workspace, so a 0.x
consumer is never handed the next minor; these two arrived later from
usd-vrm-plugins and kept SameMajorVersion. The helper defaults to
SameMinorVersion, and DEPENDENCIES.md §2 now states the rule.
* motionBvhConfig.cmake guarded find_dependency(motionSource) on
`openstrata::motion::motionSource`, a C++ namespace rather than a
target, so the guard never held. It names motionSource::motionSource.
Every other installed file is identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 5 of the CMake cleanup. cmake/UsdMotionTesting.cmake holds how a
suite runs, never what it checks:
* usdmotion_find_test_python() -- the root's and every member's
USDMOTION_TEST_PYTHON lookup, with the pxrConfig.cmake reason stated
once. A macro, so the find's variables stay where they were.
* usdmotion_openusd_root() -- the runtime root four test directories
derived from pxr_DIR by hand.
* usdmotion_test_windows_path() -- the PATH a plain-CMake ctest needs on
Windows for OpenUSD's DLLs, which six library test directories wrote
out in full.
* usdmotion_keep_assertions() -- /UNDEBUG for test targets, with its
reason once rather than seven times.
Every registered test keeps its command, environment and labels: the
ctest definitions of the workspace build are identical before and after.
execMotion's boundary test looked for USDVRM_TEST_PYTHON, a name carried
over from usd-vrm-plugins that nothing here sets, and fell back to its
own find. It now uses USDMOTION_TEST_PYTHON like every other member.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 7 of the CMake cleanup. What is left in a component's CMakeLists.txt is what it builds, links, defines, installs and tests: comments the shared modules now carry are dropped, and each tool links its workspace libraries and OpenUSD in one call. motionBvh's recorded-conversion test requires OpenUSD itself. The library deliberately never does, so a standalone configure had no usdmotion::pxr::gf alias for the test's Windows PATH and failed to generate -- a regression from the target aliasing that the workspace build could not show, because there the root creates the aliases. Found by building every member standalone against an installed prefix. WORKSPACE.md §4 names the modules and what stays in a component; CHANGELOG.md records the change; docs-check runs when any cmake/ module changes, since check_docs.py reads the pin module and every project. Verified on Windows: ost build + ost test (53/53); plain CMake root with the Visual Studio generator (53/53, installed consumer included); all eleven members configured, built and tested standalone against an installed prefix; ost library build/test motionBvh; ost plugin build/test/package execMotion and its package-origin test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0.23.5 stages a bundle that has install rules, and a root-built tool, per target instead of reading it from the member's source tree (usd-mmd-plugins' ost report 01); 0.23.6 packages a workspace bundle from that same stage (usd-vrm-plugins' ost report 47). Together they are what moving execMotion's lib/ and plugInfo.json and the CLIs' bin/ out of the source tree needs -- the one phase of the CMake cleanup not in this branch. Until that move, a bundle without install rules keeps its source-tree outputs, so nothing here behaves differently. The re-render changes nothing but the version; release.yml mirrors the pin by hand, and check_docs.py holds the two to each other. Verified with the published 0.23.6 Windows CLI (checksum-verified): graph gate, ost build + ost test (53/53), ost plugin build/test/package execMotion and its package-origin test, and ost plugin package --workspace (one bundle, three tools). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 of 9 tasks
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
Phases 1–5 and 7 of the CMake cleanup. The goal is separation, not shorter files: the root orchestrates,
cmake/holds the shared build infrastructure, and each component'sCMakeLists.txtdeclares what it builds, links (PUBLIC/PRIVATE), installs and tests. Package identities, standalone builds and the OpenUSD 26.08 pin stay as they were.6c3ff9cUsdMotionProject.cmake: every project readsVERSIONthroughusdmotion_read_version(); the eleven hard-coded"0.5.1"fallbacks are gone, andcheck_docs.pyfails a project that restates a number1e9a923usdmotion_require_openusd()resolves OpenUSD and aliases its libraries asusdmotion::pxr::<name>, so no component branches ongfvspxr::gf. The OpenExec probe staysexecMotion's alonef44c095usdmotion_require_dependency(<pkg>)(the in-tree target orfind_package), andusdmotion_target_utf8(<tgt> PUBLIC|PRIVATE), where the scope stays the caller's to state8645993usdmotion_install_library()/usdmotion_install_tool()replace the install/export boilerplate64219d1UsdMotionTesting.cmake: the test interpreter, the Windows OpenUSDPATH, the OpenUSD root,/UNDEBUG5ab29a7WORKSPACE.md §4,DEPENDENCIES.md §2and the CHANGELOG describe the layout4bef3e0ostpinned to 0.23.6 (rendered CI, release lane, docs)One deliberate departure from the cleanup plan:
project()stays a literal call in eachCMakeLists.txt, with the helper called right after it. CMake requires that literal call in the top-level file, and a component is the top-level file wheneverostbuilds it standalone.Phase 6 is not here. Moving
execMotion'slib/+plugInfo.jsonand the CLIs'bin/out of the source tree comes in a follow-up PR. The 0.23.6 pin in this branch is the precondition: 0.23.5 added target-local stages, and 0.23.6 packages a workspace bundle from them. Until that PR, a bundle without install rules keeps its source-tree outputs, so the repin changes no behaviour.What a consumer can see
Every installed file is byte-identical except three, all on purpose:
motionSourceandmotionBvhnow writeSameMinorVersionversion files, like the other five libraries. The five switched when they joined the workspace; these two came later from usd-vrm-plugins and missed it. The rule is now inDEPENDENCIES.md §2.motionBvhConfig.cmakechecked foropenstrata::motion::motionSourcebeforefind_dependency(motionSource). That is a C++ namespace, not a target, so the check never held; it now checksmotionSource::motionSource.Other fixes:
execMotion's boundary test readUSDVRM_TEST_PYTHON, a variable name carried over from usd-vrm-plugins that nothing in this repo sets. It now usesUSDMOTION_TEST_PYTHON.usdinsideusdmotion; execMotion's check has new self-test cases for all three spellings.Type of change
Validation
Windows.
ostlanes ran on 0.23.5 for Phases 1–7 and on the published 0.23.6 CLI (checksum-verified) after the repin:ost build+ost test, 53/53 (installed consumer included). The ctest definitions (commands, environments, labels) were compared withmainand matched, apart from the alias names handed toexecMotion_boundaries. The installed tree matchedmainapart from the three files above.ost), root: 53/53.motionBvh's one OpenUSD-reaching test now requires OpenUSD itself.ost plugin test --workspace --graph-only;ost library build/test(motionCore, motionRecording, motionUsd, motionBvh);ost plugin build/test/package plugins/execMotionand--from-package;ost plugin package --workspace(one bundle, three tools).check_docs.pyand its self-test;test_check_boundaries.py.Linux and macOS are this PR's CI.
Checklist
🤖 Generated with Claude Code