Skip to content

Commit

Permalink
Enhancements for updating sbin to libexec usage
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindcheru committed Dec 17, 2024
1 parent 0555ae1 commit d3669e1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
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)

0 comments on commit d3669e1

Please sign in to comment.