Skip to content

Conversation

@zichguan-amd
Copy link
Collaborator

@zichguan-amd zichguan-amd commented Dec 18, 2025

Motivation

Remove argument to return() in CMake. return does not take error code and will fail with CMP0140 enabled, it also does not terminate the file correctly under the old policy. Ref https://cmake.org/cmake/help/latest/command/return.html

Change "not building examples" message from STATUS to WARNING and make the preceding find_package quiet for better visibility.

Technical Details

Standardize CMake warning and status messages:

  • Use WARNING for missing dependencies & unsupported ASICs for better visibility
  • Use STATUS for unsupported platforms (CUDA/Windows/Linux)

Test Plan

rocJPEG is not properly skipped with return(1). With this PR it is properly skipped.

Test Result

Added/Updated documentation?

  • Yes
  • No, does not apply to this PR.

Included Visual Studio files?

  • Yes
  • No, does not apply to this PR.

Submission Checklist

Signed-off-by: zichguan-amd <zichuan.guan@amd.com>
@zichguan-amd zichguan-amd requested a review from a team as a code owner December 18, 2025 21:53
@zichguan-amd zichguan-amd force-pushed the zichguan/cmake-return branch 3 times, most recently from c006382 to 518a6c9 Compare December 19, 2025 00:40
…ibility

Also make the preceding find_package call QUIET

Signed-off-by: zichguan-amd <zichuan.guan@amd.com>
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.

2 participants