36f4788ad5
* Add rocprofiler-sdk-utilities.cmake
- contains cmake function rocprofiler_sdk_get_gfx_architectures
* Update perfetto_reader.py
- fix hash collision
* Update project names in tests folders
- rocprofiler-tests -> rocprofiler-sdk-tests
* Fix incorrect allocation-error handling
* [CI] Disable openmp tests for navi2, navi3, and navi4
* Suppress leaks by omptarget and llvm
---------
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
[ROCm/rocprofiler-sdk commit: 2d072f9217]
44 lines
1.4 KiB
CMake
44 lines
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-sdk-tests-bin-pc-sampling-exec-mask-manipulation 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(exec_mask_manipulation.cpp PROPERTIES LANGUAGE HIP)
|
|
add_executable(exec-mask-manipulation)
|
|
target_sources(exec-mask-manipulation PRIVATE exec_mask_manipulation.cpp)
|
|
# debug symbols required for PC sampling decoding validation
|
|
target_compile_options(exec-mask-manipulation PRIVATE -W -Wall -Wextra -Wpedantic
|
|
-Wshadow -Werror -g)
|
|
|
|
find_package(Threads REQUIRED)
|
|
target_link_libraries(exec-mask-manipulation PRIVATE Threads::Threads)
|