Skip to content

[CMake]: Replace CMAKE_SOURCE_DIR -> RPP_SOURCE_DIR#672

Merged
kiritigowda merged 2 commits into
ROCm:developfrom
zacharyvincze:zv/cmake/fix-relative-paths
Feb 16, 2026
Merged

[CMake]: Replace CMAKE_SOURCE_DIR -> RPP_SOURCE_DIR#672
kiritigowda merged 2 commits into
ROCm:developfrom
zacharyvincze:zv/cmake/fix-relative-paths

Conversation

@zacharyvincze

@zacharyvincze zacharyvincze commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

PR Description:

  • Replaces CMAKE_SOURCE_DIR with RPP_SOURCE_DIR to properly refer to the relative source directory for RPP.

@zacharyvincze

zacharyvincze commented Feb 12, 2026

Copy link
Copy Markdown
Contributor Author

For future reference in this project. Please avoid using variables such as CMAKE_SOURCE_DIR or CMAKE_BINARY_DIR as this may break installs whenever RPP is being added to a larger project as a subdirectory.

Prefer to use the relative variants: CMAKE_CURRENT_SOURCE_DIR or CMAKE_CURRENT_BINARY_DIR instead. In the case of this, a variable is set in the root CMake: RPP_SOURCE_DIR to always refer to the root source directory of RPP, regardless of the location of any parent CMakeLists.txt files.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses a CMake configuration issue to properly support RPP being used as a subproject in other CMake projects. The changes replace CMAKE_SOURCE_DIR with RPP_SOURCE_DIR to ensure correct path resolution.

Changes:

  • Replaced all instances of CMAKE_SOURCE_DIR with RPP_SOURCE_DIR in src/modules/CMakeLists.txt to ensure proper relative path resolution when RPP is used as a subproject

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Feb 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #672   +/-   ##
========================================
  Coverage    92.69%   92.69%           
========================================
  Files          196      196           
  Lines        87559    87559           
========================================
+ Hits         81156    81158    +2     
+ Misses        6403     6401    -2     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kiritigowda kiritigowda merged commit d7a599c into ROCm:develop Feb 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants