From d3669e1022c62e5319e4ae6221b87dd5d87d1851 Mon Sep 17 00:00:00 2001 From: AravindanC Date: Tue, 17 Dec 2024 07:39:56 -0800 Subject: [PATCH] Enhancements for updating sbin to libexec usage --- cmake/Modules/rocprofiler-sdk-custom-compilation.cmake | 2 +- source/bin/rocprofv3.py | 2 +- source/lib/rocprofiler-sdk-tool/CMakeLists.txt | 4 ++-- source/libexec/rocprofiler-avail/CMakeLists.txt | 4 ++-- source/sbin/CMakeLists.txt | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmake/Modules/rocprofiler-sdk-custom-compilation.cmake b/cmake/Modules/rocprofiler-sdk-custom-compilation.cmake index a4035872..c66f90d7 100644 --- a/cmake/Modules/rocprofiler-sdk-custom-compilation.cmake +++ b/cmake/Modules/rocprofiler-sdk-custom-compilation.cmake @@ -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( diff --git a/source/bin/rocprofv3.py b/source/bin/rocprofv3.py index cd7f4f5c..51490c23 100755 --- a/source/bin/rocprofv3.py +++ b/source/bin/rocprofv3.py @@ -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 = [ diff --git a/source/lib/rocprofiler-sdk-tool/CMakeLists.txt b/source/lib/rocprofiler-sdk-tool/CMakeLists.txt index 264eb310..cb5aa292 100644 --- a/source/lib/rocprofiler-sdk-tool/CMakeLists.txt +++ b/source/lib/rocprofiler-sdk-tool/CMakeLists.txt @@ -28,7 +28,7 @@ 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/.." @@ -36,7 +36,7 @@ set_target_properties( install( TARGETS rocprofiler-sdk-tool - DESTINATION ${CMAKE_INSTALL_LIBDIR}/rocprofiler-sdk + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PACKAGE_NAME} COMPONENT tools EXPORT rocprofiler-sdk-tool-targets) diff --git a/source/libexec/rocprofiler-avail/CMakeLists.txt b/source/libexec/rocprofiler-avail/CMakeLists.txt index fd6e9b31..15055620 100644 --- a/source/libexec/rocprofiler-avail/CMakeLists.txt +++ b/source/libexec/rocprofiler-avail/CMakeLists.txt @@ -13,7 +13,7 @@ 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/.." @@ -21,6 +21,6 @@ set_target_properties( install( TARGETS rocprofv3-list-avail - DESTINATION ${CMAKE_INSTALL_LIBEXECDIR} + DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PACKAGE_NAME} COMPONENT tools EXPORT rocprofiler-sdk-tool-targets) diff --git a/source/sbin/CMakeLists.txt b/source/sbin/CMakeLists.txt index 1e214276..a3cdd46e 100644 --- a/source/sbin/CMakeLists.txt +++ b/source/sbin/CMakeLists.txt @@ -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)