From c38aa7f6b4d4fab0855b8514554e6eef10b99607 Mon Sep 17 00:00:00 2001 From: Karl W Schulz Date: Mon, 3 Jun 2024 11:02:30 -0500 Subject: [PATCH] adding build-collateral for test subdir Signed-off-by: Karl W Schulz [ROCm/rocprofiler-compute commit: 382a83f48bde4f5745f8edb18c612e1f0a940659] --- projects/rocprofiler-compute/tests/CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 projects/rocprofiler-compute/tests/CMakeLists.txt diff --git a/projects/rocprofiler-compute/tests/CMakeLists.txt b/projects/rocprofiler-compute/tests/CMakeLists.txt new file mode 100644 index 0000000000..8841730cc1 --- /dev/null +++ b/projects/rocprofiler-compute/tests/CMakeLists.txt @@ -0,0 +1,15 @@ +set(CMAKE_HIP_COMPILER + "amdclang++" + CACHE STRING "desired c++ compiler" FORCE) +if(CMAKE_HIP_COMPILER_ID STREQUAL "Clang") + message(STATUS "Using ${CMAKE_HIP_COMPILER} to build for amdgpu backend") +else() + message( + FATAL_ERROR + "'amdclang++' compiler required to compile test binaries for ROCm platform.") +endif() + +set(VCOPY_SOURCES ../sample/vcopy.cpp) +set_source_files_properties(${VCOPY_SOURCES} PROPERTIES LANGUAGE HIP) +add_executable(vcopy ${VCOPY_SOURCES}) +set_target_properties(vcopy PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)