From 780ef88e806c26d2ebeb41144fd97ca2e9ccfe99 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Mon, 21 Oct 2024 17:24:08 -0400 Subject: [PATCH 01/26] SWDEV-467873 - making lib install path configurable --- cmake/ElfUtils.cmake | 10 +++++----- cmake/PAPI.cmake | 32 ++++++++++++++++---------------- cmake/Packages.cmake | 2 +- external/dyninst | 2 +- external/timemory | 2 +- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cmake/ElfUtils.cmake b/cmake/ElfUtils.cmake index 8a829557..5fe582e5 100644 --- a/cmake/ElfUtils.cmake +++ b/cmake/ElfUtils.cmake @@ -93,11 +93,11 @@ endif() set(_eu_root ${PROJECT_BINARY_DIR}/external/elfutils) set(_eu_inc_dirs $) -set(_eu_lib_dirs $) -set(_eu_libs $ - $) -set(_eu_build_byproducts "${_eu_root}/lib/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" - "${_eu_root}/lib/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") +set(_eu_lib_dirs $) +set(_eu_libs $ + $) +set(_eu_build_byproducts "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" + "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") externalproject_add( rocprofiler-systems-elfutils-build diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index 5d0d0f45..99c4c806 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -33,16 +33,16 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) execute_process( COMMAND - ${CMAKE_COMMAND} -E touch ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpfm.so) + ${CMAKE_COMMAND} -E touch ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) set(_ROCPROFSYS_PAPI_BUILD_BYPRODUCTS - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) endif() rocprofiler_systems_add_option(ROCPROFSYS_PAPI_AUTO_COMPONENTS @@ -232,11 +232,11 @@ add_custom_target( rocprofiler-systems-papi-clean COMMAND ${MAKE_EXECUTABLE} distclean COMMAND ${CMAKE_COMMAND} -E rm -rf ${ROCPROFSYS_PAPI_INSTALL_DIR}/include/* - COMMAND ${CMAKE_COMMAND} -E rm -rf ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/* + COMMAND ${CMAKE_COMMAND} -E rm -rf ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/* COMMAND - ${CMAKE_COMMAND} -E touch ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpfm.so + ${CMAKE_COMMAND} -E touch ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so WORKING_DIRECTORY ${ROCPROFSYS_PAPI_SOURCE_DIR}/src COMMENT "Cleaning PAPI...") @@ -247,16 +247,16 @@ set(PAPI_INCLUDE_DIR ${ROCPROFSYS_PAPI_INSTALL_DIR}/include CACHE PATH "PAPI include folder" FORCE) set(PAPI_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a CACHE FILEPATH "PAPI library" FORCE) set(PAPI_pfm_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpfm.so + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so CACHE FILEPATH "PAPI library" FORCE) set(PAPI_STATIC_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a CACHE FILEPATH "PAPI library" FORCE) set(PAPI_pfm_STATIC_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a CACHE FILEPATH "PAPI library" FORCE) target_include_directories(rocprofiler-systems-papi SYSTEM @@ -269,7 +269,7 @@ rocprofiler_systems_target_compile_definitions( $) install( - DIRECTORY ${ROCPROFSYS_PAPI_INSTALL_DIR}/lib/ + DIRECTORY ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT papi FILES_MATCHING diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake index f3383505..6ba67b4f 100644 --- a/cmake/Packages.cmake +++ b/cmake/Packages.cmake @@ -706,7 +706,7 @@ install( COMPONENT gotcha) if(ROCPROFSYS_BUILD_LIBUNWIND) install( - DIRECTORY ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/lib/ + DIRECTORY ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT libunwind FILES_MATCHING diff --git a/external/dyninst b/external/dyninst index 3d1942de..758f0f0b 160000 --- a/external/dyninst +++ b/external/dyninst @@ -1 +1 @@ -Subproject commit 3d1942dee70a0008a7bb9e5f18d8b4abc0a91290 +Subproject commit 758f0f0bdcf0b6dc075ad268a6ed86c54d6a6ecc diff --git a/external/timemory b/external/timemory index 9ce43f32..7fd045cd 160000 --- a/external/timemory +++ b/external/timemory @@ -1 +1 @@ -Subproject commit 9ce43f32939dd71aa8905f5c72537e9a3ffcc7c2 +Subproject commit 7fd045cdbc013d8f229329bc2ac0d6717b9da785 From 11eb47faa4511d511e303145ee1299700a222a86 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Mon, 21 Oct 2024 18:06:05 -0400 Subject: [PATCH 02/26] Fixed formatting --- cmake/ElfUtils.cmake | 10 ++++++---- cmake/PAPI.cmake | 14 +++++++++----- cmake/Packages.cmake | 3 ++- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/cmake/ElfUtils.cmake b/cmake/ElfUtils.cmake index 5fe582e5..a7e56968 100644 --- a/cmake/ElfUtils.cmake +++ b/cmake/ElfUtils.cmake @@ -94,10 +94,12 @@ endif() set(_eu_root ${PROJECT_BINARY_DIR}/external/elfutils) set(_eu_inc_dirs $) set(_eu_lib_dirs $) -set(_eu_libs $ - $) -set(_eu_build_byproducts "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" - "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") +set(_eu_libs + $ + $) +set(_eu_build_byproducts + "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" + "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") externalproject_add( rocprofiler-systems-elfutils-build diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index 99c4c806..bfae81af 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -32,11 +32,13 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") ${ROCPROFSYS_PAPI_INSTALL_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E make_directory + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) execute_process( COMMAND - ${CMAKE_COMMAND} -E touch ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${CMAKE_COMMAND} -E touch + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) set(_ROCPROFSYS_PAPI_BUILD_BYPRODUCTS @@ -232,9 +234,11 @@ add_custom_target( rocprofiler-systems-papi-clean COMMAND ${MAKE_EXECUTABLE} distclean COMMAND ${CMAKE_COMMAND} -E rm -rf ${ROCPROFSYS_PAPI_INSTALL_DIR}/include/* - COMMAND ${CMAKE_COMMAND} -E rm -rf ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/* + COMMAND ${CMAKE_COMMAND} -E rm -rf + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/* COMMAND - ${CMAKE_COMMAND} -E touch ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${CMAKE_COMMAND} -E touch + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so WORKING_DIRECTORY ${ROCPROFSYS_PAPI_SOURCE_DIR}/src diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake index 6ba67b4f..0bbc69d5 100644 --- a/cmake/Packages.cmake +++ b/cmake/Packages.cmake @@ -706,7 +706,8 @@ install( COMPONENT gotcha) if(ROCPROFSYS_BUILD_LIBUNWIND) install( - DIRECTORY ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ + DIRECTORY + ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT libunwind FILES_MATCHING From 940e6729578696703f489f7290e8f06418b12f8e Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Mon, 21 Oct 2024 18:12:08 -0400 Subject: [PATCH 03/26] Fixed formatting --- cmake/ElfUtils.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/ElfUtils.cmake b/cmake/ElfUtils.cmake index a7e56968..86586df1 100644 --- a/cmake/ElfUtils.cmake +++ b/cmake/ElfUtils.cmake @@ -96,7 +96,8 @@ set(_eu_inc_dirs $) set(_eu_lib_dirs $) set(_eu_libs $ - $) + $ + ) set(_eu_build_byproducts "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") From 1b46573d1fa4ff7537feafc1ef98095c39b7c304 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Tue, 22 Oct 2024 09:57:30 -0400 Subject: [PATCH 04/26] Setting default libdir to lib64 for opensuse build --- .github/workflows/opensuse.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/opensuse.yml b/.github/workflows/opensuse.yml index e6e787a0..75da781f 100644 --- a/.github/workflows/opensuse.yml +++ b/.github/workflows/opensuse.yml @@ -99,6 +99,7 @@ jobs: -DROCPROFSYS_CI_MPI_RUN_AS_ROOT=ON -DROCPROFSYS_MAX_THREADS=64 -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" + -DCMAKE_DEFAULT_INSTALL_LIBDIR=lib64 -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} - name: Install From 39c120ca2be7668367f9e0b0edde00e0b6915dcf Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Tue, 22 Oct 2024 10:17:25 -0400 Subject: [PATCH 05/26] Set -DCMAKE_DEFAULT_INSTALL_LIBDIR=lib for redhat build --- .github/workflows/redhat.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/redhat.yml b/.github/workflows/redhat.yml index c7a402b7..40b898d6 100644 --- a/.github/workflows/redhat.yml +++ b/.github/workflows/redhat.yml @@ -123,6 +123,7 @@ jobs: -DROCPROFSYS_PYTHON_PREFIX=/opt/conda/envs -DROCPROFSYS_PYTHON_ENVS="py3.6;py3.7;py3.8;py3.9;py3.10;py3.11" -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" + -DCMAKE_DEFAULT_INSTALL_LIBDIR=lib -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} -- -LE "transpose|rccl" From 74deaae6ce25b8e95eae61e3ffeafbd675c13d79 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Tue, 22 Oct 2024 15:35:00 -0400 Subject: [PATCH 06/26] Modified timemory --- external/timemory | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/timemory b/external/timemory index 7fd045cd..5960d3b4 160000 --- a/external/timemory +++ b/external/timemory @@ -1 +1 @@ -Subproject commit 7fd045cdbc013d8f229329bc2ac0d6717b9da785 +Subproject commit 5960d3b4a2d9b3a09972ea91e473d309e5a7d0d2 From 5014b1d2f5e0ffc2aca0b76c3f2f33580034ef46 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Tue, 22 Oct 2024 16:05:40 -0400 Subject: [PATCH 07/26] Changed CMAKE_DEFAULT_INSTALL_LIBDIR to CMAKE_INSTALL_LIBDIR --- cmake/ElfUtils.cmake | 10 +++++----- cmake/PAPI.cmake | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmake/ElfUtils.cmake b/cmake/ElfUtils.cmake index 86586df1..c23419f6 100644 --- a/cmake/ElfUtils.cmake +++ b/cmake/ElfUtils.cmake @@ -93,14 +93,14 @@ endif() set(_eu_root ${PROJECT_BINARY_DIR}/external/elfutils) set(_eu_inc_dirs $) -set(_eu_lib_dirs $) +set(_eu_lib_dirs $) set(_eu_libs - $ - $ + $ + $ ) set(_eu_build_byproducts - "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" - "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") + "${_eu_root}/${CMAKE_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" + "${_eu_root}/${CMAKE_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") externalproject_add( rocprofiler-systems-elfutils-build diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index bfae81af..fd3cb286 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -34,17 +34,17 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) set(_ROCPROFSYS_PAPI_BUILD_BYPRODUCTS - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) endif() rocprofiler_systems_add_option(ROCPROFSYS_PAPI_AUTO_COMPONENTS From b6bfa3a953105642670e9773482dfe4497c7dd28 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Tue, 22 Oct 2024 16:09:53 -0400 Subject: [PATCH 08/26] Fixed formatting --- cmake/PAPI.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index fd3cb286..cc30dbec 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -32,9 +32,8 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") ${ROCPROFSYS_PAPI_INSTALL_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) - execute_process( - COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) + execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch From 856cf47907c05f8dd9c68b686da759dd2863c99f Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Tue, 22 Oct 2024 16:58:39 -0400 Subject: [PATCH 09/26] Added diagnostic message --- cmake/PAPI.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index cc30dbec..6d3580ea 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -27,6 +27,8 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_SOURCE_DIR}") ${ROCPROFSYS_PAPI_SOURCE_DIR}) endif() +message(STATUS "aleks: CMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}") + if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}) From 2bb5d1af74db84da2ab6bbd1fa8b2005a960c5f3 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Tue, 22 Oct 2024 17:04:01 -0400 Subject: [PATCH 10/26] Added diagnostic message --- cmake/PAPI.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index 6d3580ea..6e616969 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -28,6 +28,7 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_SOURCE_DIR}") endif() message(STATUS "aleks: CMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}") +message(STATUS "aleks: CMAKE_DEFAULT_INSTALL_LIBDIR=${CMAKE_DEFAULT_INSTALL_LIBDIR}") if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory From c2b2551a53289c0c24d387dc57fac936940197dc Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Tue, 22 Oct 2024 17:15:37 -0400 Subject: [PATCH 11/26] Removed diagnostic message, modified *LIBDIR --- cmake/PAPI.cmake | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index 6e616969..489f2f8b 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -27,26 +27,23 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_SOURCE_DIR}") ${ROCPROFSYS_PAPI_SOURCE_DIR}) endif() -message(STATUS "aleks: CMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}") -message(STATUS "aleks: CMAKE_DEFAULT_INSTALL_LIBDIR=${CMAKE_DEFAULT_INSTALL_LIBDIR}") - if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) set(_ROCPROFSYS_PAPI_BUILD_BYPRODUCTS - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) endif() rocprofiler_systems_add_option(ROCPROFSYS_PAPI_AUTO_COMPONENTS From e336b40ae296e55de7e79e5e951608918c5f16cf Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Tue, 22 Oct 2024 17:18:58 -0400 Subject: [PATCH 12/26] Fixed formatting --- cmake/PAPI.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index 489f2f8b..bfae81af 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -32,8 +32,9 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") ${ROCPROFSYS_PAPI_INSTALL_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E make_directory + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch From a6769f4a1e0ef33ca83ffe05c3ff6634cc936f0c Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Wed, 23 Oct 2024 11:42:14 -0400 Subject: [PATCH 13/26] Modified install library path for PAPI --- cmake/PAPI.cmake | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index bfae81af..7261f1f1 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -34,17 +34,17 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) set(_ROCPROFSYS_PAPI_BUILD_BYPRODUCTS - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) endif() rocprofiler_systems_add_option(ROCPROFSYS_PAPI_AUTO_COMPONENTS @@ -235,12 +235,12 @@ add_custom_target( COMMAND ${MAKE_EXECUTABLE} distclean COMMAND ${CMAKE_COMMAND} -E rm -rf ${ROCPROFSYS_PAPI_INSTALL_DIR}/include/* COMMAND ${CMAKE_COMMAND} -E rm -rf - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/* + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/* COMMAND ${CMAKE_COMMAND} -E touch - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so WORKING_DIRECTORY ${ROCPROFSYS_PAPI_SOURCE_DIR}/src COMMENT "Cleaning PAPI...") @@ -251,16 +251,16 @@ set(PAPI_INCLUDE_DIR ${ROCPROFSYS_PAPI_INSTALL_DIR}/include CACHE PATH "PAPI include folder" FORCE) set(PAPI_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a CACHE FILEPATH "PAPI library" FORCE) set(PAPI_pfm_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so CACHE FILEPATH "PAPI library" FORCE) set(PAPI_STATIC_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a CACHE FILEPATH "PAPI library" FORCE) set(PAPI_pfm_STATIC_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a CACHE FILEPATH "PAPI library" FORCE) target_include_directories(rocprofiler-systems-papi SYSTEM From 1d86312d2748137dbb4cceedf4b5fc7c641400c6 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Wed, 23 Oct 2024 11:45:39 -0400 Subject: [PATCH 14/26] Fixed formatting --- cmake/PAPI.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index 7261f1f1..d1274a27 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -32,9 +32,8 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") ${ROCPROFSYS_PAPI_INSTALL_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) - execute_process( - COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) + execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch From 196038b6f8856fafca70a9a6bb1ee942b2d07cfa Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Thu, 24 Oct 2024 10:56:38 -0400 Subject: [PATCH 15/26] Modified CMake scripts --- cmake/PAPI.cmake | 2 +- cmake/Packages.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index d1274a27..499b7d82 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -272,7 +272,7 @@ rocprofiler_systems_target_compile_definitions( $) install( - DIRECTORY ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ + DIRECTORY ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT papi FILES_MATCHING diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake index 0bbc69d5..598d267d 100644 --- a/cmake/Packages.cmake +++ b/cmake/Packages.cmake @@ -707,7 +707,7 @@ install( if(ROCPROFSYS_BUILD_LIBUNWIND) install( DIRECTORY - ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ + ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/${CMAKE_INSTALL_LIBDIR}/ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT libunwind FILES_MATCHING From 376d6a44f99a51eca348319eefb0933a746ae533 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Thu, 24 Oct 2024 10:59:09 -0400 Subject: [PATCH 16/26] Modified CMake scripts in submodule dyninst --- external/dyninst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/dyninst b/external/dyninst index 758f0f0b..8db15749 160000 --- a/external/dyninst +++ b/external/dyninst @@ -1 +1 @@ -Subproject commit 758f0f0bdcf0b6dc075ad268a6ed86c54d6a6ecc +Subproject commit 8db1574934daa453dd9a3883f30e4e3eed52a9af From bf2102bfe5e3a585c16ee9f1ff28e56309277610 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Fri, 25 Oct 2024 10:34:29 -0400 Subject: [PATCH 17/26] Removed unnecessary setting from workflow YAML files --- .github/workflows/opensuse.yml | 1 - .github/workflows/redhat.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/opensuse.yml b/.github/workflows/opensuse.yml index 75da781f..e6e787a0 100644 --- a/.github/workflows/opensuse.yml +++ b/.github/workflows/opensuse.yml @@ -99,7 +99,6 @@ jobs: -DROCPROFSYS_CI_MPI_RUN_AS_ROOT=ON -DROCPROFSYS_MAX_THREADS=64 -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" - -DCMAKE_DEFAULT_INSTALL_LIBDIR=lib64 -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} - name: Install diff --git a/.github/workflows/redhat.yml b/.github/workflows/redhat.yml index 40b898d6..c7a402b7 100644 --- a/.github/workflows/redhat.yml +++ b/.github/workflows/redhat.yml @@ -123,7 +123,6 @@ jobs: -DROCPROFSYS_PYTHON_PREFIX=/opt/conda/envs -DROCPROFSYS_PYTHON_ENVS="py3.6;py3.7;py3.8;py3.9;py3.10;py3.11" -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" - -DCMAKE_DEFAULT_INSTALL_LIBDIR=lib -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} -- -LE "transpose|rccl" From 53bcfdb14898a19367be67edc4738dec9b5b8f28 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Fri, 25 Oct 2024 18:02:52 -0400 Subject: [PATCH 18/26] Modified CMake scripts --- cmake/ElfUtils.cmake | 8 ++++---- cmake/PAPI.cmake | 34 +++++++++++++++++----------------- cmake/Packages.cmake | 4 ++-- external/timemory | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cmake/ElfUtils.cmake b/cmake/ElfUtils.cmake index c23419f6..87651aeb 100644 --- a/cmake/ElfUtils.cmake +++ b/cmake/ElfUtils.cmake @@ -95,12 +95,12 @@ set(_eu_root ${PROJECT_BINARY_DIR}/external/elfutils) set(_eu_inc_dirs $) set(_eu_lib_dirs $) set(_eu_libs - $ - $ + $ + $ ) set(_eu_build_byproducts - "${_eu_root}/${CMAKE_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" - "${_eu_root}/${CMAKE_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") + "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" + "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") externalproject_add( rocprofiler-systems-elfutils-build diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index 499b7d82..7b9dfb2c 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -33,17 +33,17 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) set(_ROCPROFSYS_PAPI_BUILD_BYPRODUCTS - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) endif() rocprofiler_systems_add_option(ROCPROFSYS_PAPI_AUTO_COMPONENTS @@ -234,12 +234,12 @@ add_custom_target( COMMAND ${MAKE_EXECUTABLE} distclean COMMAND ${CMAKE_COMMAND} -E rm -rf ${ROCPROFSYS_PAPI_INSTALL_DIR}/include/* COMMAND ${CMAKE_COMMAND} -E rm -rf - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/* + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/* COMMAND ${CMAKE_COMMAND} -E touch - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so WORKING_DIRECTORY ${ROCPROFSYS_PAPI_SOURCE_DIR}/src COMMENT "Cleaning PAPI...") @@ -250,16 +250,16 @@ set(PAPI_INCLUDE_DIR ${ROCPROFSYS_PAPI_INSTALL_DIR}/include CACHE PATH "PAPI include folder" FORCE) set(PAPI_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a CACHE FILEPATH "PAPI library" FORCE) set(PAPI_pfm_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so CACHE FILEPATH "PAPI library" FORCE) set(PAPI_STATIC_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a CACHE FILEPATH "PAPI library" FORCE) set(PAPI_pfm_STATIC_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a CACHE FILEPATH "PAPI library" FORCE) target_include_directories(rocprofiler-systems-papi SYSTEM @@ -272,8 +272,8 @@ rocprofiler_systems_target_compile_definitions( $) install( - DIRECTORY ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/ - DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} + DIRECTORY ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ + DESTINATION ${CMAKE_DEFAULT_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT papi FILES_MATCHING PATTERN "*.so*") diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake index 598d267d..cbfa01ec 100644 --- a/cmake/Packages.cmake +++ b/cmake/Packages.cmake @@ -707,8 +707,8 @@ install( if(ROCPROFSYS_BUILD_LIBUNWIND) install( DIRECTORY - ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/${CMAKE_INSTALL_LIBDIR}/ - DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} + ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ + DESTINATION ${CMAKE_DEFAULT_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT libunwind FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}*") diff --git a/external/timemory b/external/timemory index 5960d3b4..904f7e04 160000 --- a/external/timemory +++ b/external/timemory @@ -1 +1 @@ -Subproject commit 5960d3b4a2d9b3a09972ea91e473d309e5a7d0d2 +Subproject commit 904f7e04b743f34a6fada6775ecefbb79f351c58 From 3cfa7303a72685e04d5d9ff7f3098752fe8b0925 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Fri, 25 Oct 2024 18:05:24 -0400 Subject: [PATCH 19/26] Fixed formatting --- cmake/PAPI.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index 7b9dfb2c..69a2703a 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -32,8 +32,9 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") ${ROCPROFSYS_PAPI_INSTALL_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) - execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) + execute_process( + COMMAND ${CMAKE_COMMAND} -E make_directory + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch From 682b0a1d4af42e0a1bfaaeba7e2139c9d5d0edb1 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Fri, 25 Oct 2024 18:20:40 -0400 Subject: [PATCH 20/26] Modified workflow files --- .github/workflows/opensuse.yml | 1 + .github/workflows/redhat.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/opensuse.yml b/.github/workflows/opensuse.yml index e6e787a0..d71bc8af 100644 --- a/.github/workflows/opensuse.yml +++ b/.github/workflows/opensuse.yml @@ -99,6 +99,7 @@ jobs: -DROCPROFSYS_CI_MPI_RUN_AS_ROOT=ON -DROCPROFSYS_MAX_THREADS=64 -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" + -DCMAKE_INSTALL_LIBDIR="lib64" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} - name: Install diff --git a/.github/workflows/redhat.yml b/.github/workflows/redhat.yml index c7a402b7..53340f8d 100644 --- a/.github/workflows/redhat.yml +++ b/.github/workflows/redhat.yml @@ -123,6 +123,7 @@ jobs: -DROCPROFSYS_PYTHON_PREFIX=/opt/conda/envs -DROCPROFSYS_PYTHON_ENVS="py3.6;py3.7;py3.8;py3.9;py3.10;py3.11" -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" + -DCMAKE_INSTALL_LIBDIR="lib64" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} -- -LE "transpose|rccl" From 5d73408993ec93fd4e9190c2ea0e5ebbca70e028 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Fri, 25 Oct 2024 18:31:05 -0400 Subject: [PATCH 21/26] Modified workflow files --- .github/workflows/opensuse.yml | 2 +- .github/workflows/redhat.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/opensuse.yml b/.github/workflows/opensuse.yml index d71bc8af..eacf4f06 100644 --- a/.github/workflows/opensuse.yml +++ b/.github/workflows/opensuse.yml @@ -99,7 +99,7 @@ jobs: -DROCPROFSYS_CI_MPI_RUN_AS_ROOT=ON -DROCPROFSYS_MAX_THREADS=64 -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" - -DCMAKE_INSTALL_LIBDIR="lib64" + -DCMAKE_DEFAULT_INSTALL_LIBDIR="lib64" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} - name: Install diff --git a/.github/workflows/redhat.yml b/.github/workflows/redhat.yml index 53340f8d..0ba1d044 100644 --- a/.github/workflows/redhat.yml +++ b/.github/workflows/redhat.yml @@ -123,7 +123,7 @@ jobs: -DROCPROFSYS_PYTHON_PREFIX=/opt/conda/envs -DROCPROFSYS_PYTHON_ENVS="py3.6;py3.7;py3.8;py3.9;py3.10;py3.11" -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" - -DCMAKE_INSTALL_LIBDIR="lib64" + -DCMAKE_DEFAULT_INSTALL_LIBDIR="lib64" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} -- -LE "transpose|rccl" From 3c2236559a901d60d6bc5e7d3ae17651668853eb Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Fri, 25 Oct 2024 19:53:00 -0400 Subject: [PATCH 22/26] Modified CMake scripts --- CMakeLists.txt | 6 +++--- cmake/ElfUtils.cmake | 8 ++++---- cmake/PAPI.cmake | 34 +++++++++++++++++----------------- cmake/Packages.cmake | 4 ++-- external/timemory | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd161996..df1cf56c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,13 +98,13 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") set(_STRIP_LIBRARIES_DEFAULT ON) endif() -if(DEFINED CMAKE_INSTALL_LIBDIR AND NOT DEFINED CMAKE_DEFAULT_INSTALL_LIBDIR) +if(DEFINED CMAKE_DEFAULT_INSTALL_LIBDIR AND NOT DEFINED CMAKE_INSTALL_LIBDIR) # always have a fresh install unset(CMAKE_INSTALL_LIBDIR CACHE) include(GNUInstallDirs) # install directories # force this because dyninst always installs to lib - set(CMAKE_DEFAULT_INSTALL_LIBDIR - "${CMAKE_INSTALL_LIBDIR}" + set(CMAKE_INSTALL_LIBDIR + "${CMAKE_DEFAULT_INSTALL_LIBDIR}" CACHE STRING "Object code libraries" FORCE) endif() diff --git a/cmake/ElfUtils.cmake b/cmake/ElfUtils.cmake index 87651aeb..c23419f6 100644 --- a/cmake/ElfUtils.cmake +++ b/cmake/ElfUtils.cmake @@ -95,12 +95,12 @@ set(_eu_root ${PROJECT_BINARY_DIR}/external/elfutils) set(_eu_inc_dirs $) set(_eu_lib_dirs $) set(_eu_libs - $ - $ + $ + $ ) set(_eu_build_byproducts - "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" - "${_eu_root}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") + "${_eu_root}/${CMAKE_INSTALL_LIBDIR}/libdw${CMAKE_STATIC_LIBRARY_SUFFIX}" + "${_eu_root}/${CMAKE_INSTALL_LIBDIR}/libelf${CMAKE_STATIC_LIBRARY_SUFFIX}") externalproject_add( rocprofiler-systems-elfutils-build diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index 69a2703a..bbe7f7a1 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -34,17 +34,17 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) set(_ROCPROFSYS_PAPI_BUILD_BYPRODUCTS - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so) + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so) endif() rocprofiler_systems_add_option(ROCPROFSYS_PAPI_AUTO_COMPONENTS @@ -235,12 +235,12 @@ add_custom_target( COMMAND ${MAKE_EXECUTABLE} distclean COMMAND ${CMAKE_COMMAND} -E rm -rf ${ROCPROFSYS_PAPI_INSTALL_DIR}/include/* COMMAND ${CMAKE_COMMAND} -E rm -rf - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/* + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/* COMMAND ${CMAKE_COMMAND} -E touch - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so WORKING_DIRECTORY ${ROCPROFSYS_PAPI_SOURCE_DIR}/src COMMENT "Cleaning PAPI...") @@ -251,16 +251,16 @@ set(PAPI_INCLUDE_DIR ${ROCPROFSYS_PAPI_INSTALL_DIR}/include CACHE PATH "PAPI include folder" FORCE) set(PAPI_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a CACHE FILEPATH "PAPI library" FORCE) set(PAPI_pfm_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.so + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.so CACHE FILEPATH "PAPI library" FORCE) set(PAPI_STATIC_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpapi.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpapi.a CACHE FILEPATH "PAPI library" FORCE) set(PAPI_pfm_STATIC_LIBRARY - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/libpfm.a + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libpfm.a CACHE FILEPATH "PAPI library" FORCE) target_include_directories(rocprofiler-systems-papi SYSTEM @@ -273,8 +273,8 @@ rocprofiler_systems_target_compile_definitions( $) install( - DIRECTORY ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ - DESTINATION ${CMAKE_DEFAULT_INSTALL_LIBDIR}/${PROJECT_NAME} + DIRECTORY ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/ + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT papi FILES_MATCHING PATTERN "*.so*") diff --git a/cmake/Packages.cmake b/cmake/Packages.cmake index cbfa01ec..598d267d 100644 --- a/cmake/Packages.cmake +++ b/cmake/Packages.cmake @@ -707,8 +707,8 @@ install( if(ROCPROFSYS_BUILD_LIBUNWIND) install( DIRECTORY - ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/${CMAKE_DEFAULT_INSTALL_LIBDIR}/ - DESTINATION ${CMAKE_DEFAULT_INSTALL_LIBDIR}/${PROJECT_NAME} + ${PROJECT_BINARY_DIR}/external/timemory/external/libunwind/install/${CMAKE_INSTALL_LIBDIR}/ + DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} COMPONENT libunwind FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}*") diff --git a/external/timemory b/external/timemory index 904f7e04..a414b351 160000 --- a/external/timemory +++ b/external/timemory @@ -1 +1 @@ -Subproject commit 904f7e04b743f34a6fada6775ecefbb79f351c58 +Subproject commit a414b351b2198f14589224711208a54145dc7df3 From 768dbd3238beea2735adc619ccdf091ef5fe6b19 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Fri, 25 Oct 2024 19:55:23 -0400 Subject: [PATCH 23/26] Fixed formatting --- cmake/PAPI.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/PAPI.cmake b/cmake/PAPI.cmake index bbe7f7a1..499b7d82 100644 --- a/cmake/PAPI.cmake +++ b/cmake/PAPI.cmake @@ -32,9 +32,8 @@ if(NOT EXISTS "${ROCPROFSYS_PAPI_INSTALL_DIR}") ${ROCPROFSYS_PAPI_INSTALL_DIR}) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${ROCPROFSYS_PAPI_INSTALL_DIR}/include) - execute_process( - COMMAND ${CMAKE_COMMAND} -E make_directory - ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) + execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory + ${ROCPROFSYS_PAPI_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}) execute_process( COMMAND ${CMAKE_COMMAND} -E touch From 1d86b848aef23686f66eca9734f478f457fb66e3 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Mon, 28 Oct 2024 16:42:45 -0400 Subject: [PATCH 24/26] Modified build scripts --- .github/workflows/opensuse.yml | 1 - .github/workflows/redhat.yml | 1 - CMakeLists.txt | 11 +++++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/opensuse.yml b/.github/workflows/opensuse.yml index eacf4f06..e6e787a0 100644 --- a/.github/workflows/opensuse.yml +++ b/.github/workflows/opensuse.yml @@ -99,7 +99,6 @@ jobs: -DROCPROFSYS_CI_MPI_RUN_AS_ROOT=ON -DROCPROFSYS_MAX_THREADS=64 -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" - -DCMAKE_DEFAULT_INSTALL_LIBDIR="lib64" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} - name: Install diff --git a/.github/workflows/redhat.yml b/.github/workflows/redhat.yml index 0ba1d044..c7a402b7 100644 --- a/.github/workflows/redhat.yml +++ b/.github/workflows/redhat.yml @@ -123,7 +123,6 @@ jobs: -DROCPROFSYS_PYTHON_PREFIX=/opt/conda/envs -DROCPROFSYS_PYTHON_ENVS="py3.6;py3.7;py3.8;py3.9;py3.10;py3.11" -DROCPROFSYS_DISABLE_EXAMPLES="transpose;rccl" - -DCMAKE_DEFAULT_INSTALL_LIBDIR="lib64" -DROCPROFSYS_BUILD_NUMBER=${{ github.run_attempt }} -- -LE "transpose|rccl" diff --git a/CMakeLists.txt b/CMakeLists.txt index df1cf56c..55624eb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,8 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") set(_STRIP_LIBRARIES_DEFAULT ON) endif() -if(DEFINED CMAKE_DEFAULT_INSTALL_LIBDIR AND NOT DEFINED CMAKE_INSTALL_LIBDIR) +if (NOT DEFINED CMAKE_INSTALL_LIBDIR) + if(DEFINED CMAKE_DEFAULT_INSTALL_LIBDIR) # always have a fresh install unset(CMAKE_INSTALL_LIBDIR CACHE) include(GNUInstallDirs) # install directories @@ -106,6 +107,11 @@ if(DEFINED CMAKE_DEFAULT_INSTALL_LIBDIR AND NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "${CMAKE_DEFAULT_INSTALL_LIBDIR}" CACHE STRING "Object code libraries" FORCE) + else() + set(CMAKE_INSTALL_LIBDIR + "lib" + CACHE STRING "Object code libraries" FORCE) + endif() endif() if(NOT "$ENV{ROCPROFSYS_CI}" STREQUAL "") @@ -150,9 +156,6 @@ endif() include(Compilers) # compiler identification include(BuildSettings) # compiler flags -set(CMAKE_INSTALL_LIBDIR - "lib" - CACHE STRING "Object code libraries (lib)" FORCE) set(CMAKE_CXX_STANDARD 17 CACHE STRING "CXX language standard") From 832164d5f21dafaaeb0dd50a1f5548718ee0168d Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Mon, 28 Oct 2024 16:48:29 -0400 Subject: [PATCH 25/26] Fixed formatting --- CMakeLists.txt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55624eb0..5021a4aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,19 +99,19 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") endif() if (NOT DEFINED CMAKE_INSTALL_LIBDIR) - if(DEFINED CMAKE_DEFAULT_INSTALL_LIBDIR) - # always have a fresh install - unset(CMAKE_INSTALL_LIBDIR CACHE) - include(GNUInstallDirs) # install directories - # force this because dyninst always installs to lib - set(CMAKE_INSTALL_LIBDIR - "${CMAKE_DEFAULT_INSTALL_LIBDIR}" - CACHE STRING "Object code libraries" FORCE) - else() - set(CMAKE_INSTALL_LIBDIR - "lib" - CACHE STRING "Object code libraries" FORCE) - endif() + if(DEFINED CMAKE_DEFAULT_INSTALL_LIBDIR) + # always have a fresh install + unset(CMAKE_INSTALL_LIBDIR CACHE) + include(GNUInstallDirs) # install directories + # force this because dyninst always installs to lib + set(CMAKE_INSTALL_LIBDIR + "${CMAKE_DEFAULT_INSTALL_LIBDIR}" + CACHE STRING "Object code libraries" FORCE) + else() + set(CMAKE_INSTALL_LIBDIR + "lib" + CACHE STRING "Object code libraries" FORCE) + endif() endif() if(NOT "$ENV{ROCPROFSYS_CI}" STREQUAL "") From bb2a68a9a9164a6a688a5cf9409fa988f843ca50 Mon Sep 17 00:00:00 2001 From: Aleksandar Janicijevic Date: Mon, 28 Oct 2024 16:50:24 -0400 Subject: [PATCH 26/26] Fixed formatting --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5021a4aa..0c791cea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") set(_STRIP_LIBRARIES_DEFAULT ON) endif() -if (NOT DEFINED CMAKE_INSTALL_LIBDIR) +if(NOT DEFINED CMAKE_INSTALL_LIBDIR) if(DEFINED CMAKE_DEFAULT_INSTALL_LIBDIR) # always have a fresh install unset(CMAKE_INSTALL_LIBDIR CACHE)