Build system (libdw), correlation ID, and shebang fixes (#354)
* Fix compilation for output library
- link to targets for ATT (amd-comgr, dw, elf)
* Relax correlation ID retirement log failures
- only fail for correlation ID retirement underflow when building in CI mode
* Fix shebang for several files
- license was inserted before shebang in several places
* Update code coverage exclude folders for samples
* Tweak to agent tests
- test to make sure hsa agent is not the old value instead of testing that it is the new value
* Fix libdw include/link
---------
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
[ROCm/rocprofiler-sdk commit: 3580478426]
This commit is contained in:
@@ -27,61 +27,6 @@ endforeach()
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
if(PkgConfig_FOUND)
|
||||
set(ENV{PKG_CONFIG_SYSTEM_INCLUDE_PATH} "")
|
||||
pkg_check_modules(DW libdw)
|
||||
|
||||
if(DW_FOUND
|
||||
AND DW_INCLUDE_DIRS
|
||||
AND DW_LIBRARIES)
|
||||
set(libdw_INCLUDE_DIR
|
||||
"${DW_INCLUDE_DIRS}"
|
||||
CACHE FILEPATH "libdw include directory")
|
||||
set(libdw_LIBRARY
|
||||
"${DW_LIBRARIES}"
|
||||
CACHE FILEPATH "libdw libraries")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT libdw_INCLUDE_DIR OR NOT libdw_LIBRARY)
|
||||
find_path(
|
||||
libdw_ROOT_DIR
|
||||
NAMES include/elfutils/libdw.h
|
||||
HINTS ${libdw_ROOT}
|
||||
PATHS ${libdw_ROOT})
|
||||
|
||||
mark_as_advanced(libdw_ROOT_DIR)
|
||||
|
||||
find_path(
|
||||
libdw_INCLUDE_DIR
|
||||
NAMES elfutils/libdw.h
|
||||
HINTS ${libdw_ROOT}
|
||||
PATHS ${libdw_ROOT}
|
||||
PATH_SUFFIXES include)
|
||||
|
||||
find_library(
|
||||
libdw_LIBRARY
|
||||
NAMES dw
|
||||
HINTS ${libdw_ROOT}
|
||||
PATHS ${libdw_ROOT}
|
||||
PATH_SUFFIXES lib lib64)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(libdw DEFAULT_MSG libdw_LIBRARY libdw_INCLUDE_DIR)
|
||||
|
||||
if(libdw_FOUND AND NOT TARGET libdw::libdw)
|
||||
add_library(libdw::libdw INTERFACE IMPORTED)
|
||||
if(TARGET PkgConfig::DW AND DW_FOUND)
|
||||
target_link_libraries(libdw::libdw INTERFACE PkgConfig::DW)
|
||||
else()
|
||||
target_link_libraries(libdw::libdw INTERFACE ${libdw_LIBRARY})
|
||||
target_include_directories(libdw::libdw SYSTEM INTERFACE ${libdw_INCLUDE_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(pc-sampling-integration-test-client SHARED)
|
||||
target_sources(
|
||||
pc-sampling-integration-test-client
|
||||
@@ -104,7 +49,7 @@ target_sources(
|
||||
target_link_libraries(
|
||||
pc-sampling-integration-test-client
|
||||
PRIVATE rocprofiler-sdk::rocprofiler-sdk rocprofiler-sdk::tests-build-flags
|
||||
rocprofiler-sdk::tests-common-library amd_comgr dw)
|
||||
rocprofiler-sdk::tests-common-library)
|
||||
|
||||
set_source_files_properties(main.cpp PROPERTIES LANGUAGE HIP)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
Reference in New Issue
Block a user