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>
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
06005c7f6b
commit
3580478426
@@ -25,63 +25,6 @@ foreach(_TYPE DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
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()
|
||||
|
||||
mark_as_advanced(libdw_INCLUDE_DIR libdw_LIBRARY)
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
find_package(
|
||||
amd_comgr
|
||||
@@ -92,9 +35,7 @@ find_package(
|
||||
${ROCM_PATH}
|
||||
PATHS
|
||||
${rocm_version_DIR}
|
||||
${ROCM_PATH}
|
||||
PATH_SUFFIXES
|
||||
lib/cmake/amd_comgr)
|
||||
${ROCM_PATH})
|
||||
|
||||
set_source_files_properties(main.cpp PROPERTIES LANGUAGE HIP)
|
||||
set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS "-g")
|
||||
|
||||
Reference in New Issue
Block a user