ef2751c120
1.Make directed_test apps linked against static libs
of hip, rocclr, rocr, roct and amd_comgr.
2.Remove custom_target amdhip64_static_combiner.
3.Support EXCLUDE_HIP_LIB_TYPE <static|shared>.
4.Simplify argument list parsing.
5.Install rocclr when rocm is installed.
6.Fix some original small bugs.
Revert "Revert "Make directed_test support static libs""
This reverts commit 144a6fb100.
Change-Id: I918eeae94487e5e2ff5bfde083667ac65fb6e702
24 lines
588 B
CMake
24 lines
588 B
CMake
#Follow "README.md" to generate square.cpp if it's missing
|
|
|
|
project(square)
|
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
# Search for rocm in common locations
|
|
list(APPEND CMAKE_PREFIX_PATH /opt/rocm/hip /opt/rocm)
|
|
|
|
# create square.cpp
|
|
execute_process(COMMAND sh -c "/opt/rocm/hip/bin/hipify-perl ../square.cu > ../square.cpp")
|
|
|
|
# Find hip
|
|
find_package(hip)
|
|
|
|
# Set compiler and linker
|
|
set(CMAKE_CXX_COMPILER ${HIP_HIPCC_EXECUTABLE})
|
|
set(CMAKE_CXX_LINKER ${HIP_HIPCC_EXECUTABLE})
|
|
|
|
# Create the excutable
|
|
add_executable(square square.cpp)
|
|
|
|
# Link with HIP
|
|
target_link_libraries(square hip::host) |