Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize CMake #629

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dmitrii-galantsev
Copy link

Currently CMAKE_INSTALL_PREFIX and CPACK_PACKAGING_INSTALL_PREFIX have "/opt/rocm" hardcoded. This pull request resolves the issue by deriving from a common variable: ROCM_PATH.

This change also adds 2 options which are helpful for debugging and modern editors. These don't have an effect on compilation.

find_package has a REQUIRED parameter which will make CMake fail if the
package is not found.

RVS depends on YAML - add it as as dependency.

Signed-off-by: Galantsev, Dmitrii <[email protected]>
@dmitrii-galantsev dmitrii-galantsev changed the title Set default install dir to CMAKE_INSTALL_PREFIX Modernize CMake Jun 28, 2023
Signed-off-by: Galantsev, Dmitrii <[email protected]>
Previously it would fail with 'cannot write to /rvs' because
CPACK_PACKAGING_INSTALL_PREFIX wasn't expanded.

Signed-off-by: Galantsev, Dmitrii <[email protected]>
Comment on lines +146 to +147
set(CPACK_DEBIAN_PACKAGE_DEPENDS "rocblas, libyaml-cpp-dev")
set(CPACK_RPM_PACKAGE_REQUIRES "rocblas, yaml-cpp-devel")
Copy link
Author

Choose a reason for hiding this comment

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

These changes are largely untested because I don't have rocblas in all of my docker images.
From a quick check - yaml-cpp-devel is present on rhel 8.x, 9.x, and opensuse tumbleweed. libyaml-cpp-dev is present on ubuntu 22.04.

Copy link
Collaborator

@manoj-freyr manoj-freyr left a comment

Choose a reason for hiding this comment

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

looks good

@manoj-freyr manoj-freyr requested a review from jkottiku January 10, 2024 09:31
@dmitrii-galantsev
Copy link
Author

bump

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