From d7c2fa886759f97474f78af5db83b6c478d3a421 Mon Sep 17 00:00:00 2001 From: AravindanC Date: Thu, 23 May 2024 08:23:14 -0700 Subject: [PATCH] SWDEV-460492 Update permissions, install target types of executables Change-Id: I23828d4938ce35f2c27d86654f4e122f8886ec1d [ROCm/rocprofiler commit: 59230206a3fd20fcab5fc50e40c96a9264610ead] --- projects/rocprofiler/CMakeLists.txt | 14 ++++++++------ projects/rocprofiler/plugin/att/CMakeLists.txt | 1 - projects/rocprofiler/src/api/CMakeLists.txt | 7 ++++--- .../rocprofiler/src/tools/rocsys/CMakeLists.txt | 6 ++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/projects/rocprofiler/CMakeLists.txt b/projects/rocprofiler/CMakeLists.txt index e7fc72c119..37e31907c7 100644 --- a/projects/rocprofiler/CMakeLists.txt +++ b/projects/rocprofiler/CMakeLists.txt @@ -255,29 +255,31 @@ install( # rpl_run.sh install( - FILES ${CMAKE_CURRENT_SOURCE_DIR}/bin/rpl_run.sh + PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bin/rpl_run.sh DESTINATION ${CMAKE_INSTALL_BINDIR} - PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE RENAME rocprof COMPONENT runtime) configure_file(bin/rocprofv2 ${PROJECT_BINARY_DIR} COPYONLY) install( - FILES ${PROJECT_SOURCE_DIR}/bin/rocprofv2 + PROGRAMS ${PROJECT_SOURCE_DIR}/bin/rocprofv2 DESTINATION ${CMAKE_INSTALL_BINDIR} - PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE COMPONENT runtime) install( - FILES ${CMAKE_CURRENT_SOURCE_DIR}/bin/txt2xml.sh + PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/bin/txt2xml.sh ${CMAKE_CURRENT_SOURCE_DIR}/bin/merge_traces.sh + DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${ROCPROFILER_NAME} + COMPONENT runtime) + +install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/bin/txt2params.py ${CMAKE_CURRENT_SOURCE_DIR}/bin/txt2params.py ${CMAKE_CURRENT_BINARY_DIR}/bin/tblextr.py ${CMAKE_CURRENT_SOURCE_DIR}/bin/dform.py ${CMAKE_CURRENT_SOURCE_DIR}/bin/mem_manager.py ${CMAKE_CURRENT_SOURCE_DIR}/bin/sqlitedb.py DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${ROCPROFILER_NAME} - PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE COMPONENT runtime) # gfx_metrics.xml metrics.xml diff --git a/projects/rocprofiler/plugin/att/CMakeLists.txt b/projects/rocprofiler/plugin/att/CMakeLists.txt index eda2cb5c67..dab2bc1636 100644 --- a/projects/rocprofiler/plugin/att/CMakeLists.txt +++ b/projects/rocprofiler/plugin/att/CMakeLists.txt @@ -64,5 +64,4 @@ configure_file(ui/httpserver.py att/ui/httpserver.py COPYONLY) install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/att DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/rocprofiler - USE_SOURCE_PERMISSIONS COMPONENT runtime) diff --git a/projects/rocprofiler/src/api/CMakeLists.txt b/projects/rocprofiler/src/api/CMakeLists.txt index a27789c8fe..99ba1a3f67 100644 --- a/projects/rocprofiler/src/api/CMakeLists.txt +++ b/projects/rocprofiler/src/api/CMakeLists.txt @@ -396,10 +396,11 @@ configure_file( ${PROJECT_SOURCE_DIR}/src/core/counters/metrics/derived_counters.xml ${PROJECT_BINARY_DIR}/libexec/rocprofiler/counters/derived_counters.xml COPYONLY) +# instead of Directory install, using each file install for better handling of Permissions +file(GLOB install_files CONFIGURE_DEPENDS "${PROJECT_BINARY_DIR}/libexec/rocprofiler/counters/*.xml") install( - DIRECTORY ${PROJECT_BINARY_DIR}/libexec/rocprofiler/counters - DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME} - USE_SOURCE_PERMISSIONS + FILES ${install_files} + DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/${PROJECT_NAME}/counters COMPONENT runtime) # ######################################################################################## diff --git a/projects/rocprofiler/src/tools/rocsys/CMakeLists.txt b/projects/rocprofiler/src/tools/rocsys/CMakeLists.txt index d6d10c7af1..3c2f44cc4c 100644 --- a/projects/rocprofiler/src/tools/rocsys/CMakeLists.txt +++ b/projects/rocprofiler/src/tools/rocsys/CMakeLists.txt @@ -19,9 +19,7 @@ target_link_libraries(rocprofiler_rocsys_fe dl rt stdc++fs) install( TARGETS rocprofiler_rocsys_fe - RUNTIME PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE - DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT runtime) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT runtime) # ########################################################################################