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 all commits
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
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
2 changes: 1 addition & 1 deletion source/include/rocprofiler-sdk-roctx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ set(ROCTX_HEADER_FILES

install(
FILES ${ROCTX_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk-roctx
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}-roctx
COMPONENT roctx)
2 changes: 1 addition & 1 deletion source/include/rocprofiler-sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set(ROCPROFILER_HEADER_FILES

install(
FILES ${ROCPROFILER_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}
COMPONENT development)

add_subdirectory(hip)
Expand Down
2 changes: 1 addition & 1 deletion source/include/rocprofiler-sdk/amd_detail/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ set(ROCPROFILER_AMD_DETAIL_HEADER_FILES thread_trace.h thread_trace_core.h

install(
FILES ${ROCPROFILER_AMD_DETAIL_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/amd_detail/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/amd_detail/
COMPONENT development)
2 changes: 1 addition & 1 deletion source/include/rocprofiler-sdk/cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set(ROCPROFILER_CXX_HEADER_FILES hash.hpp name_info.hpp operators.hpp perfetto.h

install(
FILES ${ROCPROFILER_CXX_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/cxx
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/cxx
COMPONENT development)

add_subdirectory(codeobj)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ set(ROCPROFILER_CXX_CODEOBJ_HEADERS code_printing.hpp disassembly.hpp segment.hp

install(
FILES ${ROCPROFILER_CXX_CODEOBJ_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/cxx/codeobj
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/cxx/codeobj
COMPONENT development)
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ set(ROCPROFILER_CXX_DETAILS_HEADER_FILES tokenize.hpp join.hpp mpl.hpp name_info

install(
FILES ${ROCPROFILER_CXX_DETAILS_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/cxx/details
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/cxx/details
COMPONENT development)
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ set(ROCPROFILER_EXPERIMENTAL_HEADER_FILES counters.h)

install(
FILES ${ROCPROFILER_EXPERIMENTAL_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/experimental
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/experimental
COMPONENT development)
2 changes: 1 addition & 1 deletion source/include/rocprofiler-sdk/hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ set(ROCPROFILER_HIP_HEADER_FILES api_args.h api_id.h compiler_api_id.h runtime_a

install(
FILES ${ROCPROFILER_HIP_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/hip
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/hip
COMPONENT development)
2 changes: 1 addition & 1 deletion source/include/rocprofiler-sdk/hsa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ set(ROCPROFILER_HSA_HEADER_FILES

install(
FILES ${ROCPROFILER_HSA_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/hsa
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/hsa
COMPONENT development)
2 changes: 1 addition & 1 deletion source/include/rocprofiler-sdk/kfd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ set(ROCPROFILER_KFD_HEADER_FILES page_migration_args.h page_migration_id.h)

install(
FILES ${ROCPROFILER_KFD_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/kfd
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/kfd
COMPONENT development)
2 changes: 1 addition & 1 deletion source/include/rocprofiler-sdk/marker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ set(ROCPROFILER_MARKER_HEADER_FILES api_args.h api_id.h table_id.h)

install(
FILES ${ROCPROFILER_MARKER_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/marker
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/marker
COMPONENT development)
2 changes: 1 addition & 1 deletion source/include/rocprofiler-sdk/rccl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(ROCPROFILER_RCCL_HEADER_FILES api_args.h api_id.h table_id.h)

install(
FILES ${ROCPROFILER_RCCL_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/rccl
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/rccl
COMPONENT development)

add_subdirectory(details)
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ set(ROCPROFILER_RCCL_DETAILS_HEADER_FILES api_trace.h rccl.h)

install(
FILES ${ROCPROFILER_RCCL_DETAILS_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler-sdk/rccl/details
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PACKAGE_NAME}/rccl/details
COMPONENT development)
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/lib/rocprofiler-sdk-tool/kokkosp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ target_link_libraries(
set_target_properties(
rocprofiler-sdk-tool-kokkosp
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}
SKIP_BUILD_RPATH OFF
Expand All @@ -29,6 +29,6 @@ set_target_properties(

install(
TARGETS rocprofiler-sdk-tool-kokkosp
DESTINATION ${CMAKE_INSTALL_LIBDIR}/rocprofiler-sdk
DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PACKAGE_NAME}
COMPONENT tools
EXPORT rocprofiler-sdk-tool-targets)
10 changes: 5 additions & 5 deletions source/lib/rocprofiler-sdk/counters/xml/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
configure_file(basic_counters.xml
${PROJECT_BINARY_DIR}/share/rocprofiler-sdk/basic_counters.xml COPYONLY)
${PROJECT_BINARY_DIR}/share/${PACKAGE_NAME}/basic_counters.xml COPYONLY)
configure_file(derived_counters.xml
${PROJECT_BINARY_DIR}/share/rocprofiler-sdk/derived_counters.xml COPYONLY)
${PROJECT_BINARY_DIR}/share/${PACKAGE_NAME}/derived_counters.xml COPYONLY)

install(
FILES ${PROJECT_BINARY_DIR}/share/rocprofiler-sdk/basic_counters.xml
${PROJECT_BINARY_DIR}/share/rocprofiler-sdk/derived_counters.xml
DESTINATION share/rocprofiler-sdk
FILES ${PROJECT_BINARY_DIR}/share/${PACKAGE_NAME}/basic_counters.xml
${PROJECT_BINARY_DIR}/share/${PACKAGE_NAME}/derived_counters.xml
DESTINATION share/${PACKAGE_NAME}
COMPONENT core)
6 changes: 3 additions & 3 deletions source/lib/rocprofiler-sdk/counters/yaml/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
configure_file(counter_defs.yaml
${PROJECT_BINARY_DIR}/share/rocprofiler-sdk/counter_defs.yaml COPYONLY)
${PROJECT_BINARY_DIR}/share/${PACKAGE_NAME}/counter_defs.yaml COPYONLY)
install(
FILES ${PROJECT_BINARY_DIR}/share/rocprofiler-sdk/counter_defs.yaml
DESTINATION share/rocprofiler-sdk
FILES ${PROJECT_BINARY_DIR}/share/${PACKAGE_NAME}/counter_defs.yaml
DESTINATION share/${PACKAGE_NAME}
COMPONENT core)
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