Skip to content

fix: reconcile Makefile/CMake example target lists in 4 directories - #597

Draft
zichguan-amd wants to merge 2 commits into
amd-stagingfrom
fix/makefile-cmake-target-parity
Draft

zichguan-amd wants to merge 2 commits into
amd-stagingfrom
fix/makefile-cmake-target-parity

Conversation

@zichguan-amd

Copy link
Copy Markdown
Collaborator

Summary

A repo-wide scan comparing each directory's Makefile example/subproject list against the sibling CMakeLists.txt add_subdirectory() calls turned up several leaf examples that are buildable by one build system but not the other, with no guard explaining the gap. This PR reconciles four of them:

  • HIP-Basic: execution_context builds unconditionally in CMake but was never added to the Makefile's EXAMPLES list.
  • Libraries/rocProfiler-SDK: thread_trace builds unconditionally in CMake (# Available since ROCm 10) but was missing from the Makefile.
  • Libraries/rocSPARSE/level_3: spmm has its own Makefile and CMakeLists.txt (plus Visual Studio project files) but was absent from the parent list in both build systems — it was never built by either.
  • Libraries/MIVisionX: mv_objdetect was disabled in CMake pending Jira ROCM-1771, but the Makefile never got the matching skip and kept building it. The Makefile now skips it too, with a comment matching CMake's.

Investigated but intentionally left out of scope

HIP-Basic/static_device_library builds via Make but has no CMake support. This is not a bug: its README.md explicitly documents that static device libraries "must be linked with hipcc" and that "there is no support yet for linking such libraries with ... CMake." Adding CMake support would require solving an unsupported tooling gap, not a simple wiring fix, so it's left alone.

Verification

  • execution_context, thread_trace, and spmm were each built directly via their leaf Makefile using the local ROCm 7.x toolchain.
  • Libraries/rocSPARSE/level_3 was also configured and built fresh via CMake to confirm the new add_subdirectory(spmm) wiring produces a working rocsparse_spmm target.
  • Libraries/MIVisionX's Makefile was invoked directly to confirm mv_objdetect is no longer attempted (the canny build itself fails locally only because MIVisionX/OpenVX dev headers aren't installed in this environment — unrelated to this change).

Test plan

  • CI build/test matrix passes for HIP-Basic, Libraries/rocProfiler-SDK, Libraries/rocSPARSE, and Libraries/MIVisionX on both the Make and CMake paths.

🤖 Generated with Claude Code

Several leaf examples were buildable by one build system but not the
other, with no guard explaining the gap:

- HIP-Basic: `execution_context` builds unconditionally in CMake but
  was never added to the Makefile's EXAMPLES list.
- Libraries/rocProfiler-SDK: `thread_trace` builds unconditionally in
  CMake (available since ROCm 10) but was missing from the Makefile.
- Libraries/rocSPARSE/level_3: `spmm` has its own Makefile and
  CMakeLists.txt but was absent from the parent list in both build
  systems, so it was never built by either.
- Libraries/MIVisionX: `mv_objdetect` was disabled in CMake pending
  Jira ROCM-1771, but the Makefile never got the matching skip and
  kept building it.

Verified each change by building the affected target directly with
the local ROCm toolchain (Make) and, for rocSPARSE/level_3, via a
fresh CMake configure + build.
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Security scan found no critical or high findings on lines changed by this pull request

View the security scan run for complete reports.

“New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant