6099e623a4
* SWDEV-483130: Replace calls to deprecated functions hipHostMalloc/hipHostFree
* SWDEV-483130: Replace calls to deprecated functions hipHostMalloc/hipHostFree. Moved definitions from lib/commons/defines.hpp to samples/common/defines.hpp and tests/common/defines.hpp
* Updated comment for clarity
* Update tests/rocprofv3/aborted-app/validate.py
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Formatting
* Formatting
* Updated CHANGELOG
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
[ROCm/rocprofiler-sdk commit: 8d7be2e4b4]
44 righe
1.4 KiB
CMake
44 righe
1.4 KiB
CMake
#
|
|
#
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
if(NOT CMAKE_HIP_COMPILER)
|
|
find_program(
|
|
amdclangpp_EXECUTABLE
|
|
NAMES amdclang++
|
|
HINTS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATHS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATH_SUFFIXES bin llvm/bin NO_CACHE)
|
|
mark_as_advanced(amdclangpp_EXECUTABLE)
|
|
|
|
if(amdclangpp_EXECUTABLE)
|
|
set(CMAKE_HIP_COMPILER "${amdclangpp_EXECUTABLE}")
|
|
endif()
|
|
endif()
|
|
|
|
project(rocprofiler-tool-test-app-scratch-memory LANGUAGES CXX HIP)
|
|
|
|
foreach(_TYPE DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
|
|
if("${CMAKE_HIP_FLAGS_${_TYPE}}" STREQUAL "")
|
|
set(CMAKE_HIP_FLAGS_${_TYPE} "${CMAKE_CXX_FLAGS_${_TYPE}}")
|
|
endif()
|
|
endforeach()
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_HIP_STANDARD 17)
|
|
set(CMAKE_HIP_EXTENSIONS OFF)
|
|
set(CMAKE_HIP_STANDARD_REQUIRED ON)
|
|
|
|
set_source_files_properties(scratch-memory.cpp PROPERTIES LANGUAGE HIP)
|
|
add_executable(scratch-memory)
|
|
target_sources(scratch-memory PRIVATE scratch-memory.cpp)
|
|
target_compile_options(scratch-memory PRIVATE -W -Wall -Wextra -Wpedantic -Wshadow
|
|
-Werror)
|
|
|
|
find_package(Threads REQUIRED)
|
|
target_link_libraries(scratch-memory PRIVATE Threads::Threads hsa-runtime64
|
|
rocprofiler-sdk::tests-common-library)
|