Make samples support cmake

Only cmake can support static lib of hip rt.
Thus samples will support static lib of hip
rt when this is done.

Change-Id: I70e8d06e85084369a035b42c5d1d56287c874ac9
이 커밋은 다음에 포함됨:
Tao Sang 작성하고 Tao Sang가 2020-09-18 07:37:02 -04:00를 커밋함
1 부모 5bf2a70382
커밋 8f72a6993f
23 파일이 변경됨
+490 -12

검색과 일치하는 파일 없음

+20
파일 보기
@@ -0,0 +1,20 @@
project(hipEvent)
cmake_minimum_required(VERSION 3.10)
# Search for rocm in common locations
list(APPEND CMAKE_PREFIX_PATH /opt/rocm/hip /opt/rocm)
# Find hip
find_package(hip)
# Set compiler and linker
set(CMAKE_CXX_COMPILER ${HIP_HIPCC_EXECUTABLE})
set(CMAKE_CXX_LINKER ${HIP_HIPCC_EXECUTABLE})
set(CMAKE_BUILD_TYPE Release)
# Create the excutable
add_executable(hipEvent hipEvent.cpp)
# Link with HIP
target_link_libraries(hipEvent hip::host)