Skip to content

Commit

Permalink
Enhance CMAKE install instructions with std install location/destinat…
Browse files Browse the repository at this point in the history
…ion (#85)

* Enhancement - usage of package name flags commonly across for getting unique folder name

* Enhancements - updating libexec/pkg usage, avoid sbin

* CMAKE Format Update

* Python Format Update

* Revert "Enhancement - usage of package name flags commonly across for getting unique folder name"

This reverts commit 2dcd1ac5f22ab90112d90648e4b5dab5c54bc639.

* REview Comments - Revert PACKAGE_NAME usage

* Review Comments - Update source folders accordingly to new cmake install locations
  • Loading branch information
arvindcheru authored Jan 22, 2025
1 parent 89cfb53 commit 6bb60bf
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 21 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
1 change: 0 additions & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ add_subdirectory(include)
add_subdirectory(lib)
add_subdirectory(libexec)
add_subdirectory(bin)
add_subdirectory(sbin)
add_subdirectory(docs)
4 changes: 3 additions & 1 deletion source/bin/rocprofv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,9 @@ 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
2 changes: 1 addition & 1 deletion source/libexec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
#

add_subdirectory(rocprofiler-avail)
add_subdirectory(rocprofiler-sdk)
6 changes: 6 additions & 0 deletions source/libexec/rocprofiler-sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
#
#

add_subdirectory(rocprofiler-avail)
add_subdirectory(rocprofiler-sdk-launch-compiler)
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ 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}/rocprofiler-sdk
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}/rocprofiler-sdk
COMPONENT tools
EXPORT rocprofiler-sdk-tool-targets)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
#
#

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

install(
FILES
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBEXECDIR}/rocprofiler-sdk/rocprofiler-sdk-launch-compiler
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/rocprofiler-sdk
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ
WORLD_EXECUTE
COMPONENT tools)
15 changes: 0 additions & 15 deletions source/sbin/CMakeLists.txt

This file was deleted.

0 comments on commit 6bb60bf

Please sign in to comment.