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

Enhance cmake install instructions with std install location/destination #36

Draft
wants to merge 2 commits into
base: amd-staging
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Enhancements for updating sbin to libexec usage
  • Loading branch information
arvindcheru committed Dec 17, 2024
commit d3669e1022c62e5319e4ae6221b87dd5d87d1851
2 changes: 1 addition & 1 deletion cmake/Modules/rocprofiler-sdk-custom-compilation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function(rocprofiler_sdk_custom_compilation)
NAMES rocprofiler-sdk-launch-compiler
HINTS ${rocprofiler-sdk_ROOT_DIR} ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR}
PATHS ${rocprofiler-sdk_ROOT_DIR} ${PROJECT_BINARY_DIR} ${CMAKE_BINARY_DIR}
PATH_SUFFIXES sbin)
PATH_SUFFIXES libexec/rocprofiler-sdk)

if(NOT COMP_COMPILER)
message(
Expand Down
2 changes: 1 addition & 1 deletion source/bin/rocprofv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ def _write_env_value():
ROCPROF_KOKKOSP_LIBRARY = (
f"{ROCM_DIR}/lib/rocprofiler-sdk/librocprofiler-sdk-tool-kokkosp.so"
)
ROCPROF_LIST_AVAIL_TOOL_LIBRARY = f"{ROCM_DIR}/libexec/librocprofv3-list-avail.so"
ROCPROF_LIST_AVAIL_TOOL_LIBRARY = f"{ROCM_DIR}/libexec/rocprofiler-sdk/librocprofv3-list-avail.so"

prepend_preload = [itr for itr in args.preload if itr]
append_preload = [
Expand Down
4 changes: 2 additions & 2 deletions source/lib/rocprofiler-sdk-tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ target_link_libraries(
set_target_properties(
rocprofiler-sdk-tool
PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/rocprofiler-sdk
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/${PACKAGE_NAME}
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION}
BUILD_RPATH "\$ORIGIN:\$ORIGIN/.."
INSTALL_RPATH "\$ORIGIN:\$ORIGIN/..")

install(
TARGETS rocprofiler-sdk-tool
DESTINATION ${CMAKE_INSTALL_LIBDIR}/rocprofiler-sdk
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PACKAGE_NAME}
COMPONENT tools
EXPORT rocprofiler-sdk-tool-targets)

Expand Down
4 changes: 2 additions & 2 deletions source/libexec/rocprofiler-avail/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ target_link_libraries(

set_target_properties(
rocprofv3-list-avail
PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBEXECDIR}
PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBEXECDIR}/${PACKAGE_NAME}
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION}
BUILD_RPATH "\$ORIGIN:\$ORIGIN/.."
INSTALL_RPATH "\$ORIGIN:\$ORIGIN/..")

install(
TARGETS rocprofv3-list-avail
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PACKAGE_NAME}
COMPONENT tools
EXPORT rocprofiler-sdk-tool-targets)
6 changes: 3 additions & 3 deletions source/sbin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

configure_file(
rocprofiler-sdk-launch-compiler.sh
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_SBINDIR}/rocprofiler-sdk-launch-compiler
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBEXECDIR}/${PACKAGE_NAME}/rocprofiler-sdk-launch-compiler
COPYONLY)

install(
FILES ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_SBINDIR}/rocprofiler-sdk-launch-compiler
DESTINATION ${CMAKE_INSTALL_SBINDIR}
FILES ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBEXECDIR}/${PACKAGE_NAME}/rocprofiler-sdk-launch-compiler
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PACKAGE_NAME}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ
WORLD_EXECUTE
COMPONENT tools)
Loading